summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-05-05 13:56:06 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-05-05 13:56:06 -0400
commitb852638c1b31da62f9ab86918ac0c2a8d06af2f4 (patch)
treefe2fd2e56fe8fcd431c14a8b3c391d658728954d /modules/system
parent9fb4d89ae8f875efd44de30a566baddc3e499b2e (diff)
downloadbrdo-b852638c1b31da62f9ab86918ac0c2a8d06af2f4.tar.gz
brdo-b852638c1b31da62f9ab86918ac0c2a8d06af2f4.tar.bz2
Issue #2227687 by cs_shadow | Cottser: Slightly ugly error message if a module is incompatible with the version of core and the PHP version.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 465fd9f4d..c1e81f0bb 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -995,22 +995,28 @@ function _system_modules_build_row($info, $extra) {
$status_short = '';
$status_long = '';
+ // Initialize empty arrays of long and short reasons explaining why the
+ // module is incompatible.
+ // Add each reason as a separate element in both the arrays.
+ $reasons_short = array();
+ $reasons_long = array();
+
// Check the core compatibility.
if (!isset($info['core']) || $info['core'] != DRUPAL_CORE_COMPATIBILITY) {
$compatible = FALSE;
- $status_short .= t('Incompatible with this version of Drupal core.');
- $status_long .= t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY));
+ $reasons_short[] = t('Incompatible with this version of Drupal core.');
+ $reasons_long[] = t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY));
}
// Ensure this module is compatible with the currently installed version of PHP.
if (version_compare(phpversion(), $info['php']) < 0) {
$compatible = FALSE;
- $status_short .= t('Incompatible with this version of PHP');
+ $reasons_short[] = t('Incompatible with this version of PHP');
$php_required = $info['php'];
if (substr_count($info['php'], '.') < 2) {
$php_required .= '.*';
}
- $status_long .= t('This module requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion()));
+ $reasons_long[] = t('This module requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion()));
}
// If this module is compatible, present a checkbox indicating
@@ -1026,6 +1032,8 @@ function _system_modules_build_row($info, $extra) {
}
}
else {
+ $status_short = implode(' ', $reasons_short);
+ $status_long = implode(' ', $reasons_long);
$form['enable'] = array(
'#markup' => theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => $status_short, 'title' => $status_short)),
);