X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FCronController.php;h=2626bf3a05915858341cc669e6a0c546951ea70e;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=ec1156955f3b511474462bc73538454c77920ea9;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/system/src/CronController.php b/web/core/modules/system/src/CronController.php index ec1156955..2626bf3a0 100644 --- a/web/core/modules/system/src/CronController.php +++ b/web/core/modules/system/src/CronController.php @@ -36,7 +36,6 @@ class CronController extends ControllerBase { return new static($container->get('cron')); } - /** * Run Cron once. * @@ -58,10 +57,10 @@ class CronController extends ControllerBase { */ public function runManually() { if ($this->cron->run()) { - drupal_set_message($this->t('Cron ran successfully.')); + $this->messenger()->addStatus($this->t('Cron ran successfully.')); } else { - drupal_set_message($this->t('Cron run failed.'), 'error'); + $this->messenger()->addError($this->t('Cron run failed.')); } return $this->redirect('system.status');