- Patch #958456 by rschwab, dww: update module uses incorrect variable for maintenance mode.
parent
0a985cdac9
commit
3a230683ea
|
@ -176,14 +176,14 @@ function update_authorize_update_batch_finished($success, $results) {
|
|||
$success = FALSE;
|
||||
}
|
||||
}
|
||||
$offline = variable_get('site_offline', FALSE);
|
||||
$offline = variable_get('maintenance_mode', FALSE);
|
||||
if ($success) {
|
||||
// Now that the update completed, we need to clear the cache of available
|
||||
// update data and recompute our status, so prevent show bogus results.
|
||||
_update_authorize_clear_update_status();
|
||||
|
||||
if ($offline) {
|
||||
variable_set('site_offline', FALSE);
|
||||
variable_set('maintenance_mode', FALSE);
|
||||
$page_message = array(
|
||||
'message' => t('Update was completed successfully. Your site has been taken out of maintenance mode.'),
|
||||
'type' => 'status',
|
||||
|
@ -233,9 +233,9 @@ function update_authorize_install_batch_finished($success, $results) {
|
|||
$success = FALSE;
|
||||
}
|
||||
}
|
||||
$offline = variable_get('site_offline', FALSE);
|
||||
$offline = variable_get('maintenance_mode', FALSE);
|
||||
if ($success && $offline) {
|
||||
variable_set('site_offline', FALSE);
|
||||
variable_set('maintenance_mode', FALSE);
|
||||
$page_message = array(
|
||||
'message' => t('Installation was completed successfully. Your site has been taken out of maintenance mode.'),
|
||||
'type' => 'status',
|
||||
|
|
|
@ -357,7 +357,7 @@ function update_manager_update_ready_form($form, &$form_state) {
|
|||
'#suffix' => '</strong>',
|
||||
);
|
||||
|
||||
$form['site_offline'] = array(
|
||||
$form['maintenance_mode'] = array(
|
||||
'#title' => t('Perform updates with site in maintenance mode (strongly recommended)'),
|
||||
'#type' => 'checkbox',
|
||||
'#default_value' => TRUE,
|
||||
|
@ -386,8 +386,8 @@ function update_manager_update_ready_form($form, &$form_state) {
|
|||
* @see system_authorized_get_url()
|
||||
*/
|
||||
function update_manager_update_ready_form_submit($form, &$form_state) {
|
||||
if ($form_state['values']['site_offline'] == TRUE) {
|
||||
variable_set('site_offline', TRUE);
|
||||
if ($form_state['values']['maintenance_mode'] == TRUE) {
|
||||
variable_set('maintenance_mode', TRUE);
|
||||
}
|
||||
|
||||
if (!empty($_SESSION['update_manager_update_projects'])) {
|
||||
|
|
Loading…
Reference in New Issue