diff options
-rw-r--r-- | modules/update/update.css | 4 | ||||
-rw-r--r-- | modules/update/update.fetch.inc | 3 | ||||
-rw-r--r-- | modules/update/update.module | 2 | ||||
-rw-r--r-- | modules/update/update.report.inc | 15 | ||||
-rw-r--r-- | modules/update/update.settings.inc | 4 |
5 files changed, 17 insertions, 11 deletions
diff --git a/modules/update/update.css b/modules/update/update.css index d6895a54a..ce0dcd6e1 100644 --- a/modules/update/update.css +++ b/modules/update/update.css @@ -56,6 +56,10 @@ direction: ltr; /* Note: version numbers should always be LTR. */ } +.update tr.unknown { + background: #ddd; +} + table.update, .update table.version { width: 100%; diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc index 19b5d4957..04bfd00b3 100644 --- a/modules/update/update.fetch.inc +++ b/modules/update/update.fetch.inc @@ -109,10 +109,11 @@ function _update_cron_notify() { include_once DRUPAL_ROOT . '/includes/install.inc'; $status = update_requirements('runtime'); $params = array(); + $notify_all = (variable_get('update_notification_threshold', 'all') == 'all'); foreach (array('core', 'contrib') as $report_type) { $type = 'update_' . $report_type; if (isset($status[$type]['severity']) - && $status[$type]['severity'] == REQUIREMENT_ERROR) { + && ($status[$type]['severity'] == REQUIREMENT_ERROR || ($notify_all && $status[$type]['reason'] == UPDATE_NOT_CURRENT))) { $params[$report_type] = $status[$type]['reason']; } } diff --git a/modules/update/update.module b/modules/update/update.module index d103f0431..6ed91d621 100644 --- a/modules/update/update.module +++ b/modules/update/update.module @@ -254,7 +254,7 @@ function _update_requirement_check($project, $type) { break; case UPDATE_NOT_CURRENT: $requirement_label = t('Out of date'); - $requirement['severity'] = variable_get('update_notification_threshold', 'all') == 'all' ? REQUIREMENT_ERROR : REQUIREMENT_WARNING; + $requirement['severity'] = REQUIREMENT_WARNING; break; case UPDATE_UNKNOWN: case UPDATE_NOT_CHECKED: diff --git a/modules/update/update.report.inc b/modules/update/update.report.inc index 8191af6a3..945933d67 100644 --- a/modules/update/update.report.inc +++ b/modules/update/update.report.inc @@ -47,17 +47,18 @@ function theme_update_report($data) { $class = 'ok'; $icon = theme('image', 'misc/watchdog-ok.png', t('ok'), t('ok')); break; + case UPDATE_UNKNOWN: + $class = 'unknown'; + $icon = theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning')); + break; case UPDATE_NOT_SECURE: case UPDATE_REVOKED: case UPDATE_NOT_SUPPORTED: + $class = 'error'; + $icon = theme('image', 'misc/watchdog-error.png', t('error'), t('error')); + break; + case UPDATE_NOT_CHECKED: case UPDATE_NOT_CURRENT: - if ($notification_level == 'all' - || $project['status'] != UPDATE_NOT_CURRENT) { - $class = 'error'; - $icon = theme('image', 'misc/watchdog-error.png', t('error'), t('error')); - break; - } - // Otherwise, deliberate no break and use the warning class/icon. default: $class = 'warning'; $icon = theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning')); diff --git a/modules/update/update.settings.inc b/modules/update/update.settings.inc index 142ff5216..e67f6ba7f 100644 --- a/modules/update/update.settings.inc +++ b/modules/update/update.settings.inc @@ -34,13 +34,13 @@ function update_settings() { $form['update_notification_threshold'] = array( '#type' => 'radios', - '#title' => t('Notification threshold'), + '#title' => t('E-mail notification threshold'), '#default_value' => variable_get('update_notification_threshold', 'all'), '#options' => array( 'all' => t('All newer versions'), 'security' => t('Only security updates'), ), - '#description' => t('If there are updates available of Drupal core or any of your installed modules and themes, your site will print an error message on the <a href="@status_report">status report</a>, the <a href="@modules_page">modules page</a>, and the <a href="@themes_page">themes page</a>. You can choose to only see these error messages if a security update is available, or to be notified about any newer versions.', array('@status_report' => url('admin/reports/status'), '@modules_page' => url('admin/build/modules'), '@themes_page' => url('admin/build/themes'))) + '#description' => t('You can choose to send e-mail only if a security update is available, or to be notified about all newer versions. If there are updates available of Drupal core or any of your installed modules and themes, your site will always print a message on the <a href="@status_report">status report</a> page, and will also display an error message on administration pages if there is a security update.', array('@status_report' => url('admin/reports/status'))) ); $form = system_settings_form($form, FALSE); |