diff --git a/modules/system/system.install b/modules/system/system.install index 323b7b3..741175d 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3193,6 +3193,28 @@ function system_update_7080() { } /** + * Ensure there's a installation profile configured and enabled. + */ +function system_update_7081() { + $profile = variable_get('install_profile'); + + // If there is no installation profile available, select the 'standard' one. + if (empty($profile)) { + $profile = 'standard'; + variable_set('install_profile', $profile); + drupal_set_message(t('No installation profile was configured, so the "standard" one has been selected.')); + } + + // Force the installation profile to be enabled. + db_update('system') + ->fields(array( + 'status' => 1, + )) + ->condition('name', $profile) + ->execute(); +} + +/** * @} End of "defgroup updates-7.x-extra". * The next series of updates should start at 8000. */