? admin_menu.patch
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.341
diff -u -p -r1.341 theme.inc
--- includes/theme.inc	6 Feb 2007 08:35:13 -0000	1.341
+++ includes/theme.inc	11 Feb 2007 14:20:50 -0000
@@ -44,9 +44,20 @@ function init_theme() {
   // list of enabled themes.
   $theme = !empty($user->theme) && $themes[$user->theme]->status ? $user->theme : variable_get('theme_default', 'garland');
 
-  // Allow modules to override the present theme... only select custom theme
-  // if it is available in the list of installed themes.
-  $theme = $custom_theme && $themes[$custom_theme] ? $custom_theme : $theme;
+  // Use the administrative theme if the user is looking at a page in the admin/* path
+  if (arg(0) == 'admin') {
+    drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', 'module');
+    // if block_admin_display() in modules/block/block.module is the first caller, don't pre-empt it
+    if (!isset($custom_theme)) {
+       $custom_theme = variable_get('admin_theme', '0');
+    }
+  }
+
+  // Allow modules to override the present theme... only select custom theme                               
+  // if it is available in the list of enabled themes.
+  if ($custom_theme && $themes[$custom_theme]) {
+    $theme = $custom_theme;
+  }
 
   // Store the identifier for retrieving theme settings with.
   $theme_key = $theme;
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.448
diff -u -p -r1.448 system.module
--- modules/system/system.module	4 Feb 2007 21:20:50 -0000	1.448
+++ modules/system/system.module	11 Feb 2007 14:20:51 -0000
@@ -290,13 +290,6 @@ function system_menu() {
 }
 
 function system_init() {
-  // Use the administrative theme if the user is looking at a page in the admin/* path.
-  if (arg(0) == 'admin') {
-    global $custom_theme;
-    $custom_theme = variable_get('admin_theme', '0');
-    drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
-  }
-
   // Add the CSS for this module.
   drupal_add_css(drupal_get_path('module', 'system') .'/defaults.css', 'module');
   drupal_add_css(drupal_get_path('module', 'system') .'/system.css', 'module');
