1 update.php update_info_page()

Provides an overview of the Backdrop site update.

This page provides cautionary suggestions that should happen before proceeding with the update to ensure data integrity.

Return value

string: Rendered HTML form.

File

core/update.php, line 285
Administrative page for handling updates from one Backdrop version to another.

Code

function update_info_page() {
  // Change query-strings on css/js files to enforce reload for all users.
  _backdrop_flush_css_js();
  // Flush the cache of all data for the update status module.
  if (db_table_exists('cache_update')) {
    cache('update')->flush();
  }

  // Flush the theme cache so we can render this page correctly if the theme
  // registry been updated with new preprocess or template variables.
  backdrop_theme_rebuild();

  update_task_list('info');
  backdrop_set_title('Backdrop site update');
  $token = backdrop_get_token('update');
  $output = '<p>Use this utility to update your site whenever you install a new version of Backdrop CMS or one of the site\'s modules.</p>';
  $output .= '<p>For more detailed information, see the <a href="https://backdropcms.org/upgrade">Upgrading Backdrop CMS</a> page. If you are unsure of what these terms mean, contact your hosting provider.</p>';
  $module_status_report = update_upgrade_check_dependencies();
  if (!empty($module_status_report)) {
    $output .= $module_status_report;
  }

  $form_action = check_url(backdrop_current_script_url(array('op' => 'check_updates', 'token' => $token)));
  $output .= '<form method="post" action="' . $form_action . '">
  <div class="form-actions">
    <input type="submit" value="Continue" class="form-submit button-primary" />
    <a href="' . base_path() . '">Cancel</a>
  </div>
  </form>';
  $output .= "\n";
  return $output;
}