I was getting ready to start a patch for http://drupal.org/node/124715 and i found a bunch of inconsistencies and bugs in how we're reporting security updates:

  1. We duplicate a lot of error/warning message text in various places, which inconsistently refer to the available updates report by different names, etc, etc.
  2. Some of the warning text refers to "security" even when it's not a security update.
  3. If we know you're out of date, but the warning threshold is set to "Only security updates", the status report (admin/logs/status) is green with the incorrect statement "Up to date".
  4. When core is out of date, the admin/logs/status report's warning is just wrong, since @version isn't substitued (we were looking in $avail, not $data for 'recommended').
  5. A few of the status constants are never used.
  6. The CSS class for yellow is called "unknown", which is a misnomer. It should really be "warning", since we warn for many reasons (unknown being only one of them).

I did a slightly major overhaul of the above, and I'm quite pleased with the results. The primary changes are:

  • Introduce a new UPDATE_STATUS_NOT_SECURE.
  • Always use UPDATE_STATUS_NOT_CURRENT if that's the case, and let people who care check the threshold setting to decide what to do with it. E.g. if you're out of date, the status report says so, but the Warning threshold determines if its red or yellow (and therefore, if /admin tells you you have problems or not).
  • Generally, let update_status_requirements() generate all the text, and re-use that as much as possible in other places.
  • Renamed the CSS class from "unknown" to "warning"

I'd post a bunch of screenshots in various cases, but it's probably best to just play with it and see for yourself.

Comments

swentel’s picture

After a small (and in the beginning a bit confusing, my bad) irc talk with dww, I agreed that the color of 'Drupal Core update status' on admin/logs/status should be yellow in case you'd chosen to report 'Only security updates', but when you have a # out-of-date packages. So very glad with this patch!

add1sun’s picture

Status: Needs review » Reviewed & tested by the community

looks good to me. good stuff.

dww’s picture

Status: Reviewed & tested by the community » Fixed

great, thanks for the reviews, add1sun and swentel. committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)