From 5aeaff1b82c6b0f28e5eff2ecb41e828a65f9bc0 Mon Sep 17 00:00:00 2001
From: Bradley M. Froehle <brad.froehle@gmail.com>
Date: Fri, 18 Feb 2011 01:41:48 -0800
Subject: [PATCH] 850846 - display dev downgrades in the manual update required table

---
 modules/update/update.manager.inc |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)

diff --git modules/update/update.manager.inc modules/update/update.manager.inc
index 5bb12c4..f6787ab 100644
--- modules/update/update.manager.inc
+++ modules/update/update.manager.inc
@@ -160,7 +160,7 @@ function update_manager_update_form($form, $form_state = array(), $context) {
     $entry['#attributes'] = array('class' => array('update-' . $type));
 
     // Drupal core needs to be upgraded manually.
-    $needs_manual = $project['project_type'] == 'core';
+    $needs_manual = ($project['project_type'] == 'core' || ($project['install_type'] == 'dev' && $project['datestamp'] > $project['releases'][$project['recommended']]['date']));
 
     if ($needs_manual) {
       // Since it won't be tableselect, #weight will add an extra column to the
@@ -177,21 +177,26 @@ function update_manager_update_form($form, $form_state = array(), $context) {
 
     // Based on what kind of project this is, save the entry into the
     // appropriate subarray.
-    switch ($project['project_type']) {
-      case 'core':
-        // Core needs manual updates at this time.
-        $projects['manual'][$name] = $entry;
-        break;
-
-      case 'module':
-      case 'theme':
-        $projects['enabled'][$name] = $entry;
-        break;
-
-      case 'module-disabled':
-      case 'theme-disabled':
-        $projects['disabled'][$name] = $entry;
-        break;
+    if ($needs_manual) {
+      $projects['manual'][$name] = $entry;
+    }
+    else {
+      switch ($project['project_type']) {
+        case 'core':
+          // Core needs manual updates at this time.
+          $projects['manual'][$name] = $entry;
+          break;
+
+        case 'module':
+        case 'theme':
+          $projects['enabled'][$name] = $entry;
+          break;
+
+        case 'module-disabled':
+        case 'theme-disabled':
+          $projects['disabled'][$name] = $entry;
+          break;
+      }
     }
   }
 
-- 
1.7.3.5

