Révision 4444412d
Ajouté par Julien Enselme il y a presque 10 ans
drupal7/modules/system/system.admin.inc | ||
---|---|---|
995 | 995 |
$status_short = ''; |
996 | 996 |
$status_long = ''; |
997 | 997 |
|
998 |
// Initialize empty arrays of long and short reasons explaining why the |
|
999 |
// module is incompatible. |
|
1000 |
// Add each reason as a separate element in both the arrays. |
|
1001 |
$reasons_short = array(); |
|
1002 |
$reasons_long = array(); |
|
1003 |
|
|
998 | 1004 |
// Check the core compatibility. |
999 | 1005 |
if (!isset($info['core']) || $info['core'] != DRUPAL_CORE_COMPATIBILITY) { |
1000 | 1006 |
$compatible = FALSE; |
1001 |
$status_short .= t('Incompatible with this version of Drupal core.');
|
|
1002 |
$status_long .= t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY));
|
|
1007 |
$reasons_short[] = t('Incompatible with this version of Drupal core.');
|
|
1008 |
$reasons_long[] = t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY));
|
|
1003 | 1009 |
} |
1004 | 1010 |
|
1005 | 1011 |
// Ensure this module is compatible with the currently installed version of PHP. |
1006 | 1012 |
if (version_compare(phpversion(), $info['php']) < 0) { |
1007 | 1013 |
$compatible = FALSE; |
1008 |
$status_short .= t('Incompatible with this version of PHP');
|
|
1014 |
$reasons_short[] = t('Incompatible with this version of PHP');
|
|
1009 | 1015 |
$php_required = $info['php']; |
1010 | 1016 |
if (substr_count($info['php'], '.') < 2) { |
1011 | 1017 |
$php_required .= '.*'; |
1012 | 1018 |
} |
1013 |
$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()));
|
|
1019 |
$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()));
|
|
1014 | 1020 |
} |
1015 | 1021 |
|
1016 | 1022 |
// If this module is compatible, present a checkbox indicating |
... | ... | |
1026 | 1032 |
} |
1027 | 1033 |
} |
1028 | 1034 |
else { |
1035 |
$status_short = implode(' ', $reasons_short); |
|
1036 |
$status_long = implode(' ', $reasons_long); |
|
1029 | 1037 |
$form['enable'] = array( |
1030 | 1038 |
'#markup' => theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => $status_short, 'title' => $status_short)), |
1031 | 1039 |
); |
Formats disponibles : Unified diff
Update drupal 7.27 -> 7.28