--- C:\Documents and Settings\gtaylor\Desktop\zen-6.x-1.x-dev\zen\zen\template.php	Mon Sep 15 10:59:02 2008
+++ C:\Documents and Settings\gtaylor\Desktop\zen-6.x-1.x-dev\zen\zen\Copy of template.php	Fri Oct 31 15:50:49 2008
@@ -35,8 +35,12 @@
  * Implements HOOK_theme().
  */
 function zen_theme(&$existing, $type, $theme, $path) {
-  include_once './' . drupal_get_path('theme', 'zen') . '/template.theme-registry.inc';
-  return _zen_theme($existing, $type, $theme, $path);
+  global $db_active;
+ 
+  if(!defined('MAINTENANCE_MODE') && isset($db_active)){
+    include_once './' . drupal_get_path('theme', 'zen') . '/template.theme-registry.inc';
+    return _zen_theme($existing, $type, $theme, $path);
+  }
 }
 
 /**
