Loads the installation profile, extracting its defined distribution name.
The distribution name defined in the profile's .info file. Defaults to "Drupal" if none is explicitly provided by the installation profile.
function drupal_install_profile_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'];
}
else {
$profile = drupal_get_profile();
$info = system_get_info('module', $profile);
return $info['distribution_name'];
}
}