diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc index 25bd7f0bdf0aa52368a4e4e637facb205b24029e..a049855a649b4e0960ca352425de411bdd90fcbd 100644 --- a/modules/update/update.manager.inc +++ b/modules/update/update.manager.inc @@ -27,7 +27,7 @@ * extracting the archive, and verifying the contents. If there are any * errors, the user is redirected back to the first page with the error * messages. If all downloads were extacted and verified, the user is instead - * redirected to admin/update/confirm, a landing page which reminds them to + * redirected to admin/update/ready, a landing page which reminds them to * backup their database and asks if they want to put the site offline during * the upgrade. Once the user presses the "Install updates" button, they are * redirected to authorize.php to supply their web root file access @@ -332,8 +332,9 @@ function update_manager_download_batch_finished($success, $results) { drupal_set_message(theme('item_list', $error_list), 'error'); } elseif ($success) { + drupal_set_message(t('Updates downloaded successfully.')); $_SESSION['update_manager_update_projects'] = $results['projects']; - drupal_goto('admin/update/confirm'); + drupal_goto('admin/update/ready'); } else { // Ideally we're catching all Exceptions, so they should never see this, @@ -343,7 +344,7 @@ function update_manager_download_batch_finished($success, $results) { } /** - * Build the form to confirm that an update should proceed (after downloading). + * Build the form when the site is ready to update (after downloading). * * This form is an intermediary step in the automated update workflow. It is * presented to the site administrator after all the required updates have @@ -353,41 +354,22 @@ function update_manager_download_batch_finished($success, $results) { * After this step, the user is redirected to authorize.php to enter their * file transfer credentials and attempt to complete the update. */ -function update_manager_confirm_update_form($form, &$form_state) { - $form['information']['#weight'] = -100; - $form['information']['backup_header'] = array( - '#prefix' => '<h3>', - '#markup' => t('Step 1: Backup your site'), - '#suffix' => '</h3>', - ); - - $form['information']['backup_message'] = array( - '#prefix' => '<p>', - '#markup' => t('We do not currently have a web based backup tool. <a href="@backup_url">Learn more about how to take a backup</a>.', array('@backup_url' => url('http://drupal.org/node/22281'))), - '#suffix' => '</p>', - ); - - $form['information']['maint_header'] = array( - '#prefix' => '<h3>', - '#markup' => t('Step 2: Enter maintenance mode'), - '#suffix' => '</h3>', - ); - - $form['information']['maint_message'] = array( - '#prefix' => '<p>', - '#markup' => t('It is strongly recommended that you put your site into maintenance mode while performing an update.'), - '#suffix' => '</p>', +function update_manager_update_ready_form($form, &$form_state) { + $form['backup'] = array( + '#prefix' => '<strong>', + '#markup' => t('Back up your database and site before you continue. <a href="@backup_url">Learn how</a>.', array('@backup_url' => url('http://drupal.org/node/22281'))), + '#suffix' => '</strong>', ); - $form['information']['site_offline'] = array( - '#title' => t('Perform updates with site in maintenance mode'), + $form['site_offline'] = array( + '#title' => t('Perform updates with site in maintenance mode (strongly recommended)'), '#type' => 'checkbox', '#default_value' => TRUE, ); $form['submit'] = array( '#type' => 'submit', - '#value' => t('Install updates'), + '#value' => t('Continue'), '#weight' => 100, ); @@ -407,7 +389,7 @@ function update_manager_confirm_update_form($form, &$form_state) { * @see system_authorized_init() * @see system_authorized_get_url() */ -function update_manager_confirm_update_form_submit($form, &$form_state) { +function update_manager_update_ready_form_submit($form, &$form_state) { if ($form_state['values']['site_offline'] == TRUE) { variable_set('site_offline', TRUE); } diff --git a/modules/update/update.module b/modules/update/update.module index a961c20870ae5fa264da81c13351cf432482af88..b3d29679f9d530d68548ad06cbb2dfdc990f77c9 100644 --- a/modules/update/update.module +++ b/modules/update/update.module @@ -103,7 +103,7 @@ function update_help($path, $arg) { case 'admin/reports/updates/install': case 'admin/reports/updates/settings': case 'admin/reports/status': - case 'admin/update/confirm': + case 'admin/update/ready': // These pages don't need additional nagging. break; @@ -225,10 +225,10 @@ function update_menu() { // Menu callback used for the confirmation page after all the releases // have been downloaded, asking you to backup before installing updates. - $items['admin/update/confirm'] = array( - 'title' => 'Confirm update', + $items['admin/update/ready'] = array( + 'title' => 'Ready to update', 'page callback' => 'drupal_get_form', - 'page arguments' => array('update_manager_confirm_update_form'), + 'page arguments' => array('update_manager_update_ready_form'), 'access callback' => 'update_manager_access', 'access arguments' => array(), 'type' => MENU_CALLBACK,