diff options
-rw-r--r-- | includes/install.inc | 6 | ||||
-rw-r--r-- | modules/system/system.install | 2 | ||||
-rw-r--r-- | modules/system/system.module | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/includes/install.inc b/includes/install.inc index 68a67bcd6..b3615f69e 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -199,7 +199,7 @@ function drupal_install_profile_distribution_name() { // At all other times, we load the profile via standard methods. else { $profile = drupal_get_profile(); - $info = install_profile_info($profile); + $info = system_get_info('module', $profile); return $info['distribution_name']; } } @@ -1199,6 +1199,10 @@ function drupal_check_module($module) { * installed, to be shown throughout the installation process. Defaults to * 'Drupal'. * + * Note that this function does an expensive file system scan to get info file + * information for dependencies. If you only need information from the info + * file itself, use system_get_info(). + * * Example of .info file: * @code * name = Minimal diff --git a/modules/system/system.install b/modules/system/system.install index eb6d01736..05d910e30 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -33,7 +33,7 @@ function system_requirements($phase) { // is not running the default install profile. $profile = drupal_get_profile(); if ($profile != 'standard') { - $info = install_profile_info($profile); + $info = system_get_info('module', $profile); $requirements['install_profile'] = array( 'title' => $t('Install profile'), 'value' => $t('%profile_name (%profile-%version)', array( diff --git a/modules/system/system.module b/modules/system/system.module index 8d09febf3..2cb42b84c 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2387,9 +2387,14 @@ function _system_rebuild_module_data() { drupal_alter('system_info', $modules[$key]->info, $modules[$key], $type); } - // The install profile is required, if it's a valid module. if (isset($modules[$profile])) { + // The install profile is required, if it's a valid module. $modules[$profile]->info['required'] = TRUE; + // Add a default distribution name if the profile did not provide one. This + // matches the default value used in install_profile_info(). + if (!isset($modules[$profile]->info['distribution_name'])) { + $modules[$profile]->info['distribution_name'] = 'Drupal'; + } } return $modules; |