diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 121d91e..433327b 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -340,8 +340,6 @@ function system_requirements($phase) { $threshold_warning = $cron_config->get('threshold.requirements_warning'); // Cron error threshold defaults to two weeks. $threshold_error = $cron_config->get('threshold.requirements_error'); - // Cron configuration help text. - $help = t('For more information, see the online handbook entry for configuring cron jobs.', array('@cron-handbook' => 'https://www.drupal.org/cron')); // Determine when cron last ran. $cron_last = \Drupal::state()->get('system.cron_last'); @@ -360,27 +358,23 @@ function system_requirements($phase) { // Set summary and description based on values determined above. $summary = t('Last run !time ago', array('!time' => \Drupal::service('date.formatter')->formatTimeDiffSince($cron_last))); - // Build the string and replacement arguments to be sent later to - // \Drupal\Component\Utility\SafeMarkup::format(). - $description_replacements = []; - $description_string = ''; if ($severity != REQUIREMENT_INFO) { - $description_warning = t('Cron has not run recently.'); - $description_replacements += [ - '@description_warning' => $description_warning, - '@help' => $help, - ]; - $description_string = '@description_warning @help '; + $description = t('Cron has not run recently. For more information, see the online handbook entry for configuring cron jobs. You can run cron manually.
To run cron from outside the site, go to @cron-outside', + array( + '@cron-handbook' => 'https://www.drupal.org/cron', + '@cron-manual' => \Drupal::url('system.run_cron'), + '@cron-outside' => \Drupal::url('system.cron', array('key' => \Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))), + ) + ); + } + else { + $description = t('You can run cron manually.
To run cron from outside the site, go to @cron-outside', + array( + '@cron-manual' => \Drupal::url('system.run_cron'), + '@cron-outside' => \Drupal::url('system.cron', array('key' => \Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))), + ) + ); } - - $description_manual = t('You can run cron manually.', array('@cron' => \Drupal::url('system.run_cron'))); - $description_additional_info = t('To run cron from outside the site, go to @cron', array('@cron' => \Drupal::url('system.cron', array('key' => \Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))))); - $description_replacements += [ - '@description_manual' => $description_manual, - '@description_additional_info' => $description_additional_info, - ]; - $description_string .= '@description_manual
@description_additional_info'; - $description = SafeMarkup::format($description_string, $description_replacements); $requirements['cron'] = array( 'title' => t('Cron maintenance tasks'),