1 restore.php restore_progress_page($one_time_token)

Show a progress message while processing a restore.

Note this page has an HTTP "Refresh" header set, so it's immediately attempting to load the restore page while being shown.

File

core/restore.php, line 149
Administrative page for restoring backup database and configuration files.

Code

function restore_progress_page($one_time_token) {
  restore_task_list('restore');
  backdrop_set_title('Restoring backup');

  // Redirect to restore process page. This uses a one-time token that is
  // only valid for a few seconds.
  $redirect_path = backdrop_current_script_url(array(
    'op' => 'restore',
    'token' => $one_time_token,
    'time' => REQUEST_TIME,
    'backup' => $_POST['backup'],
  ));

  $refresh_meta = array(
    '#tag' => 'meta',
    '#attributes' => array(
      'http-equiv' => 'Refresh',
      'content' => '0; URL=' . $redirect_path,
    ),
  );
  backdrop_add_html_head($refresh_meta, 'restore_meta_refresh');

  $output = '<p>';
  $output .= st('This process may take a while. Please wait...');
  $output .= '<span class="restore-progress">&nbsp;</span>';
  $output .= '</p>';
  return $output;
}