From f2a51e919249d2262eb25e8f4f17393774208df6 Mon Sep 17 00:00:00 2001
From: jrreid <jrreid@ucalgary.ca>
Date: Fri, 23 Mar 2012 15:00:38 -0600
Subject: [PATCH] Saving

---
 core/modules/system/system.admin.inc |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 978b0f4..852da43 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -115,12 +115,12 @@ function system_themes_page() {
 
   $theme_default = variable_get('theme_default', 'stark');
   $theme_groups  = array();
+  $admin_theme_options = array();
 
   foreach ($themes as &$theme) {
     if (!empty($theme->info['hidden'])) {
       continue;
     }
-    $admin_theme_options[$theme->name] = $theme->info['name'];
     $theme->is_default = ($theme->name == $theme_default);
 
     // Identify theme screenshot.
@@ -146,12 +146,17 @@ function system_themes_page() {
       }
     }
 
-    if (empty($theme->status)) {
-     // Ensure this theme is compatible with this version of core.
-     // Require the 'content' region to make sure the main page
-     // content has a common place in all themes.
-      $theme->incompatible_core = !isset($theme->info['core']) || ($theme->info['core'] != DRUPAL_CORE_COMPATIBILITY) || (!isset($theme->info['regions']['content']));
-      $theme->incompatible_php = version_compare(phpversion(), $theme->info['php']) < 0;
+    // Ensure this theme is compatible with this version of core.
+    // Require the 'content' region to make sure the main page
+    // content has a common place in all themes.
+    $theme->incompatible_core = !isset($theme->info['core']) || ($theme->info['core'] != DRUPAL_CORE_COMPATIBILITY) || (!isset($theme->info['regions']['content']));
+    $theme->incompatible_php = version_compare(phpversion(), $theme->info['php']) < 0;
+
+    if (!$theme->incompatible_core && !$theme->incompatible_php) {
+      $admin_theme_options[$theme->name] = $theme->info['name'];
+    }
+    else {
+      $theme->status = '0';
     }
     $query['token'] = drupal_get_token('system-theme-operation-link');
     $theme->operations = array();
-- 
1.7.6

