summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-05 04:34:04 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-05 04:34:04 +0000
commit400fa96fc6e61c7ada26827e49453bd7a1fb0189 (patch)
tree41f4bf8a6d8bfaf9491097a3ada816445aa830ee
parent1e23b91bc886b30e7a64c7c118a79071c706e39c (diff)
downloadbrdo-400fa96fc6e61c7ada26827e49453bd7a1fb0189.tar.gz
brdo-400fa96fc6e61c7ada26827e49453bd7a1fb0189.tar.bz2
#224756 by christefano and lambic: Make phpinfo() link more obvious.
-rw-r--r--modules/system/system.install24
1 files changed, 18 insertions, 6 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index aeedcf972..77ef11498 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -54,12 +54,24 @@ function system_requirements($phase) {
'value' => $software,
);
- // Test PHP version
- $requirements['php'] = array(
- 'title' => $t('PHP'),
- 'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(),
- );
- if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) {
+ // Test PHP version and show link to phpinfo() if it's available
+ $phpversion = phpversion();
+ if (function_exists('phpinfo')) {
+ $requirements['php'] = array(
+ 'title' => $t('PHP'),
+ 'value' => ($phase == 'runtime') ? $phpversion .' ('. l($t('more information'), 'admin/reports/status/php') .')' : $phpversion,
+ );
+ }
+ else {
+ $requirements['php'] = array(
+ 'title' => $t('PHP'),
+ 'value' => $phpversion,
+ 'description' => $t('The phpinfo() function has been disabled for security reasons. To see your server\'s phpinfo() information, change your PHP settings or contact your server administrator. For more information, please read the <a href="@phpinfo">Enabling and disabling phpinfo()</a> handbook page.', array('@phpinfo' => 'http://drupal.org/node/243993')),
+ 'severity' => REQUIREMENT_INFO,
+ );
+ }
+
+ if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) {
$requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
$requirements['php']['severity'] = REQUIREMENT_ERROR;
}