Commit c8826a6b authored by Gábor Hojtsy's avatar Gábor Hojtsy

#110981 by saxofaan: allow contrib modules in install profiles and runtime to...

#110981 by saxofaan: allow contrib modules in install profiles and runtime to have requirements, just like core modules; also fix a consistency between message presentation in install and runtime requirements
parent ff6ce75f
......@@ -251,7 +251,7 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
function drupal_get_install_files($module_list = array()) {
$installs = array();
foreach ($module_list as $module) {
$installs = array_merge($installs, file_scan_directory('./modules', "^$module.install$", array('.', '..', 'CVS'), 0, TRUE, 'name', 0));
$installs = array_merge($installs, drupal_system_listing($module .'.install$', 'modules'));
}
return $installs;
}
......@@ -719,7 +719,11 @@ function drupal_check_module($module) {
// Print any error messages
foreach ($requirements as $requirement) {
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
drupal_set_message($requirement['description'] .' ('. t('Currently using !item !version', array('!item' => $requirement['title'], '!version' => $requirement['value'])) .')', 'error');
$message = $requirement['description'];
if (isset($requirement['value']) && $requirement['value']) {
$message .= ' ('. t('Currently using !item !version', array('!item' => $requirement['title'], '!version' => $requirement['value'])) .')';
}
drupal_set_message($message, 'error');
}
}
return FALSE;
......
......@@ -867,7 +867,7 @@ function install_check_requirements($profile, $verify) {
foreach ($requirements as $requirement) {
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
$message = $requirement['description'];
if ($requirement['value']) {
if (isset($requirement['value']) && $requirement['value']) {
$message .= ' ('. st('Currently using !item !version', array('!item' => $requirement['title'], '!version' => $requirement['value'])) .')';
}
drupal_set_message($message, 'error');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment