From 2ae1c876995c03a5fa430d67d5e3bd2f9d89ac05 Mon Sep 17 00:00:00 2001
From: Ted Cooper <elc@784944.no-reply.drupal.org>
Date: Fri, 3 Feb 2012 01:33:20 +1000
Subject: [PATCH] Issue #147000 by ELC: Fix duplicate key error when running "drush updatedb".

---
 modules/system/system.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/system/system.module b/modules/system/system.module
index 4da1c7c..b8b7a20 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -832,7 +832,7 @@ function system_theme_data() {
       // Record the name of each theme found in the file system.
       $names[] = $theme->name;
       // Update the contents of the system table.
-      if (isset($theme->status) && !(defined('MAINTENANCE_MODE') && MAINTENANCE_MODE != 'install')) {
+      if (isset($theme->status) && !(defined('MAINTENANCE_MODE') && (MAINTENANCE_MODE != 'install' && MAINTENANCE_MODE != 'update'))) {
         db_query("UPDATE {system} SET owner = '%s', info = '%s', filename = '%s' WHERE name = '%s' AND type = '%s'", $theme->owner, serialize($theme->info), $theme->filename, $theme->name, 'theme');
       }
       else {
-- 
1.7.2.5

