Commit e334ca1b authored by Dries's avatar Dries

- Cleaned up the cron status message.

parent 45439f71
...@@ -497,15 +497,13 @@ function system_cron_settings() { ...@@ -497,15 +497,13 @@ function system_cron_settings() {
$cron_last = variable_get('cron_last', NULL); $cron_last = variable_get('cron_last', NULL);
if (is_numeric($cron_last)) { if (is_numeric($cron_last)) {
$title = t('Cron properly configured');
$status = t('Cron is running. The last cron job ran %time ago.', array('%time' => format_interval(time() - $cron_last))); $status = t('Cron is running. The last cron job ran %time ago.', array('%time' => format_interval(time() - $cron_last)));
} }
else { else {
$title = t('Cron not configured');
$status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for <a href="%url">configuring cron jobs</a>.', array('%url' => 'http://drupal.org/cron')); $status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for <a href="%url">configuring cron jobs</a>.', array('%url' => 'http://drupal.org/cron'));
} }
$form['settings'] = array('#type' => 'item', '#title' => $title, '#value' => $status); $form['settings'] = array('#type' => 'item', '#value' => $status);
return $form; return $form;
} }
......
...@@ -497,15 +497,13 @@ function system_cron_settings() { ...@@ -497,15 +497,13 @@ function system_cron_settings() {
$cron_last = variable_get('cron_last', NULL); $cron_last = variable_get('cron_last', NULL);
if (is_numeric($cron_last)) { if (is_numeric($cron_last)) {
$title = t('Cron properly configured');
$status = t('Cron is running. The last cron job ran %time ago.', array('%time' => format_interval(time() - $cron_last))); $status = t('Cron is running. The last cron job ran %time ago.', array('%time' => format_interval(time() - $cron_last)));
} }
else { else {
$title = t('Cron not configured');
$status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for <a href="%url">configuring cron jobs</a>.', array('%url' => 'http://drupal.org/cron')); $status = t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for <a href="%url">configuring cron jobs</a>.', array('%url' => 'http://drupal.org/cron'));
} }
$form['settings'] = array('#type' => 'item', '#title' => $title, '#value' => $status); $form['settings'] = array('#type' => 'item', '#value' => $status);
return $form; return $form;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment