diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/install.inc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/includes/install.inc b/includes/install.inc index c5083eb0a..9d159a7fd 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -187,8 +187,18 @@ function drupal_set_installed_schema_version($module, $version) { * @see install_profile_info() */ function drupal_install_profile_distribution_name() { - global $install_state; - return $install_state['profile_info']['distribution_name']; + // During installation, the profile information is stored in the global + // installation state (it might not be saved anywhere yet). + if (drupal_installation_attempted()) { + global $install_state; + return $install_state['profile_info']['distribution_name']; + } + // At all other times, we load the profile via standard methods. + else { + $profile = drupal_get_profile(); + $info = install_profile_info($profile); + return $info['distribution_name']; + } } /** |