You are here

function automatic_updates_run_checks in Automatic Updates 7

Page callback to run all checkers.

1 string reference to 'automatic_updates_run_checks'
automatic_updates_menu in ./automatic_updates.module
Implements hook_menu().

File

./automatic_updates.admin.inc, line 161
Administration functions for Automatic Updates module.

Code

function automatic_updates_run_checks() {
  $messages = [];
  foreach (ReadinessCheckerManager::getCategories() as $category) {
    $messages[] = ReadinessCheckerManager::run($category);
  }
  $messages = array_merge(...$messages);
  if (empty($messages)) {
    drupal_set_message(t('No issues found. Your site is ready for <a href="@readiness_checks">automatic updates</a>.', [
      '@readiness_checks' => 'https://www.drupal.org/docs/7/update/automatic-updates#readiness-checks',
    ]), 'status', FALSE);
  }
  drupal_goto('admin/config/system/automatic_updates');
}