Commit e819ccc9 authored by Dries's avatar Dries

- Patch #1014130 by catch, carlos8f, David_Rothstein: install_profile_info()...

- Patch #1014130 by catch, carlos8f, David_Rothstein: install_profile_info() does a file system scan on every request to admin/config (and etc.).
parent a5c9ab07
......@@ -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
......
......@@ -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(
......
......@@ -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;
......
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