include_once DRUPAL_ROOT . '/includes/install.inc'; include_once DRUPAL_ROOT . '/includes/batch.inc'; drupal_load_updates(); update_fix_d7_requirements(); update_fix_compatibility(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) { // update.php ops case 'selection': if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) { $output = update_selection_page(); break; } case 'Apply pending updates': if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) { update_batch(); break; } case 'info': $output = update_info_page(); break; case 'results': $output = update_results_page(); break; // Regular batch ops : defer to batch processing API // Regular batch ops : defer to batch processing API default: update_task_list('run'); $output = _batch_page(); break; }
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) { // update.php ops. case 'selection': if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'update')) { $output = update_selection_page(); break; } case 'Apply pending updates': if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'update')) { // Generate absolute URLs for the batch processing (using $base_root), // since the batch API will pass them to url() which does not handle // update.php correctly by default. $batch_url = $base_root . drupal_current_script_url(); $redirect_url = $base_root . drupal_current_script_url(array('op' => 'results')); update_batch($_POST['start'], $redirect_url, $batch_url); break; } case 'info': $output = update_info_page(); break; case 'results': $output = update_results_page(); break; // Regular batch ops : defer to batch processing API. // Regular batch ops : defer to batch processing API. default: update_task_list('run'); $output = _batch_page(); break; }
include_once DRUPAL_ROOT . '/includes/batch.inc'; drupal_load_updates(); update_fix_compatibility(); // Check the update requirements for all modules. update_check_requirements(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) { // update.php ops. case 'selection': if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) { $output = update_selection_page(); break; } case 'Apply pending updates': if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) { update_batch($_POST['start'], $base_url . '/update.php?op=results', $base_url . '/update.php'); break; } case 'info': $output = update_info_page(); break; case 'results': $output = update_results_page(); break; // Regular batch ops : defer to batch processing API. // Regular batch ops : defer to batch processing API. default: update_task_list('run'); $output = _batch_page(); break; }
$token = $request->query->get('token'); if (isset($token) && \Drupal::csrfToken()->validate($token, 'update')) { $regions['sidebar_first'] = update_task_list('select'); $output = update_selection_page(); break; } case 'Apply pending updates': $token = $request->query->get('token'); if (isset($token) && \Drupal::csrfToken()->validate($token, 'update')) { $regions['sidebar_first'] = update_task_list('run'); // Generate absolute URLs for the batch processing (using $base_root), // since the batch API will pass them to url() which does not handle // update.php correctly by default. $batch_url = $base_root . drupal_current_script_url(); $redirect_url = $base_root . drupal_current_script_url(array('op' => 'results')); $output = update_batch($request->request->get('start'), $redirect_url, $batch_url); break; } case 'info': $regions['sidebar_first'] = update_task_list('info'); $output = update_info_page(); break; case 'results': $regions['sidebar_first'] = update_task_list(); $output = update_results_page(); break; // Regular batch ops : defer to batch processing API. // Regular batch ops : defer to batch processing API. default: $regions['sidebar_first'] = update_task_list('run'); $output = _batch_page($request);