/[drupal]/drupal/modules/color/color.install
ViewVC logotype

Contents of /drupal/modules/color/color.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Wed May 13 19:42:14 2009 UTC (6 months, 2 weeks ago) by webchick
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-7, DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-8, DRUPAL-7-0-UNSTABLE-9, HEAD
Changes since 1.4: +6 -1 lines
File MIME type: text/x-php
#320011 by lilou, snufkin, and karschp: Add consistent @file declarations to all .install files.
1 <?php
2 /* $Id: color.install,v 1.4 2008/08/31 09:15:12 dries Exp $ */
3
4 /**
5 * @file
6 * Install, update and uninstall functions for the color module.
7 */
8
9 function color_requirements($phase) {
10 $requirements = array();
11
12 if ($phase == 'runtime') {
13 // Check for the PHP GD library.
14 if (function_exists('imagegd2')) {
15 $info = gd_info();
16 $requirements['gd'] = array(
17 'value' => $info['GD Version'],
18 );
19
20 // Check for PNG support.
21 if (function_exists('imagecreatefrompng')) {
22 $requirements['gd']['severity'] = REQUIREMENT_OK;
23 }
24 else {
25 $requirements['gd']['severity'] = REQUIREMENT_ERROR;
26 $requirements['gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Please check the <a href="@url">PHP image documentation</a> for information on how to correct this.', array('@url' => 'http://www.php.net/manual/ref.image.php'));
27 }
28 }
29 else {
30 $requirements['gd'] = array(
31 'value' => t('Not installed'),
32 'severity' => REQUIREMENT_ERROR,
33 'description' => t('The GD library for PHP is missing or outdated. Please check the <a href="@url">PHP image documentation</a> for information on how to correct this.', array('@url' => 'http://www.php.net/manual/ref.image.php')),
34 );
35 }
36 $requirements['gd']['title'] = t('GD library');
37 }
38
39 return $requirements;
40 }

  ViewVC Help
Powered by ViewVC 1.1.2