diff --git a/includes/update.inc b/includes/update.inc index 496b824c20e6efadba4bb47483797728af5e7ea9..958e2477f20df2a7309418ef7c841bac302a3de1 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -696,12 +696,19 @@ function update_fix_d7_requirements() { db_add_field('locales_source', 'context', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => 'The context this string applies to.')); } - // Rename 'site_offline_message' variable to 'maintenance_mode_message'. + // Rename 'site_offline_message' variable to 'maintenance_mode_message' + // and 'site_offline' variable to 'maintenance_mode'. // Old variable is removed in update for system.module, see // system_update_7036(). if ($message = variable_get('site_offline_message', NULL)) { variable_set('maintenance_mode_message', $message); } + // Old variable is removed in update for system.module, see + // system_update_7069(). + $site_offline = variable_get('site_offline', -1); + if ($site_offline != -1) { + variable_set('maintenance_mode', $site_offline); + } // Add ssid column and index. db_add_field('sessions', 'ssid', array('description' => "Secure session ID. The value is generated by Drupal's session handlers.", 'type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')); diff --git a/modules/system/system.install b/modules/system/system.install index 01924300a3b9d2fba1c2327caf6d97f1a222ef66..22cb59020ec5dc62b92a6270e196c4f5d834e988 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2964,6 +2964,15 @@ function system_update_7068() { db_change_field('url_alias', 'language', 'language', $spec); } +/** + * Remove the obsolete 'site_offline' variable. + * + * @see update_fix_d7_requirements() + */ +function system_update_7069() { + variable_del('site_offline'); +} + /** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000.