cvs diff: Diffing modules/update Index: modules/update/update.module =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.module,v retrieving revision 1.7 diff -u -p -r1.7 update.module --- modules/update/update.module 14 Dec 2007 18:08:49 -0000 1.7 +++ modules/update/update.module 21 Dec 2007 08:47:24 -0000 @@ -42,6 +42,17 @@ define('UPDATE_NOT_CHECKED', 4); define('UPDATE_UNKNOWN', 5); /** + * Current release has been unpublished and is no longer available. + */ +define('UPDATE_NOT_AVAILABLE', 6); + +/** + * Current release is no longer supported by the project maintainer. + */ +define('UPDATE_NOT_SUPPORTED', 7); + + +/** * Implementation of hook_help(). */ function update_help($path, $arg) { @@ -368,21 +379,37 @@ function _update_message_text($msg_type, $langcode = isset($language) ? $language->language : NULL; $text = ''; switch ($msg_reason) { - case UPDATE_NOT_CURRENT: + case UPDATE_NOT_SECURE: if ($msg_type == 'core') { - $text = t('There are updates available for your version of Drupal. To ensure the proper functioning of your site, you should update as soon as possible.', array(), $langcode); + $text = t('There is a security update available for your version of Drupal. To ensure the security of your server, you should update immediately!', array(), $langcode); } else { - $text = t('There are updates available for one or more of your modules or themes. To ensure the proper functioning of your site, you should update as soon as possible.', array(), $langcode); + $text = t('There are security updates available for one or more of your modules or themes. To ensure the security of your server, you should update immediately!', array(), $langcode); } break; - case UPDATE_NOT_SECURE: + case UPDATE_NOT_AVAILABLE: if ($msg_type == 'core') { - $text = t('There is a security update available for your version of Drupal. To ensure the security of your server, you should update immediately!', array(), $langcode); + $text = t('Your version of Drupal is no longer available. Upgrading is highly advised!', array(), $langcode); } else { - $text = t('There are security updates available for one or more of your modules or themes. To ensure the security of your server, you should update immediately!', array(), $langcode); + $text = t('At least one of your modules or themes is no longer available. Upgrading is highly advised!', array(), $langcode); + } + break; + + case UPDATE_NOT_SUPPORTED: + // Core only ever has a single branch, so this can never happen. + if ($msg_type != 'core') { + $text = t('At least one of your modules or themes is no longer supported. Upgrading is highly advised!', array(), $langcode); + } + break; + + case UPDATE_NOT_CURRENT: + if ($msg_type == 'core') { + $text = t('There are updates available for your version of Drupal. To ensure the proper functioning of your site, you should update as soon as possible.', array(), $langcode); + } + else { + $text = t('There are updates available for one or more of your modules or themes. To ensure the proper functioning of your site, you should update as soon as possible.', array(), $langcode); } break; } Index: modules/update/update.report.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.report.inc,v retrieving revision 1.6 diff -u -p -r1.6 update.report.inc --- modules/update/update.report.inc 20 Dec 2007 08:42:05 -0000 1.6 +++ modules/update/update.report.inc 21 Dec 2007 08:47:25 -0000 @@ -48,9 +48,11 @@ function theme_update_report($data) { $icon = theme('image', 'misc/watchdog-ok.png'); break; case UPDATE_NOT_SECURE: + case UPDATE_NOT_AVAILABLE: + case UPDATE_NOT_SUPPORTED: case UPDATE_NOT_CURRENT: if ($notification_level == 'all' - || $project['status'] == UPDATE_NOT_SECURE) { + || $project['status'] != UPDATE_NOT_CURRENT) { $class = 'error'; $icon = theme('image', 'misc/watchdog-error.png'); break; @@ -64,17 +66,27 @@ function theme_update_report($data) { $row = '
'; switch ($project['status']) { - case UPDATE_CURRENT: - $row .= t('Up to date'); - break; case UPDATE_NOT_SECURE: $row .= ''; $row .= t('Security update required!'); $row .= ''; break; + case UPDATE_NOT_AVAILABLE: + $row .= ''; + $row .= t('No longer available!'); + $row .= ''; + break; + case UPDATE_NOT_SUPPORTED: + $row .= ''; + $row .= t('Not supported!'); + $row .= ''; + break; case UPDATE_NOT_CURRENT: $row .= t('Update available'); break; + case UPDATE_CURRENT: + $row .= t('Up to date'); + break; default: $row .= check_plain($project['reason']); break;