Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.569
diff -u -r1.569 taxonomy.module
--- modules/taxonomy/taxonomy.module	25 Jan 2010 17:04:03 -0000	1.569
+++ modules/taxonomy/taxonomy.module	28 Jan 2010 21:30:00 -0000
@@ -250,6 +250,7 @@
     'page arguments' => array('taxonomy_form_term', 2),
     'access callback' => 'taxonomy_term_edit_access',
     'access arguments' => array(2),
+    'theme callback' => 'system_content_theme_override',
     'type' => MENU_LOCAL_TASK,
     'weight' => 10,
     'file' => 'taxonomy.admin.inc',
@@ -301,6 +302,7 @@
     'page arguments' => array('taxonomy_form_term', array(), 3),
     'access arguments' => array('administer taxonomy'),
     'type' => MENU_LOCAL_ACTION,
+    'theme callback' => 'system_content_theme_override',
     'file' => 'taxonomy.admin.inc',
   );
 
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1221
diff -u -r1.1221 node.module
--- modules/node/node.module	28 Jan 2010 07:10:59 -0000	1.1221
+++ modules/node/node.module	28 Jan 2010 21:30:00 -0000
@@ -1872,7 +1872,7 @@
     'access callback' => '_node_add_access',
     'weight' => 1,
     'menu_name' => 'management',
-    'theme callback' => '_node_custom_theme',
+    'theme callback' => 'system_content_theme_override',
     'file' => 'node.pages.inc',
   );
   $items['rss.xml'] = array(
@@ -1916,7 +1916,7 @@
     'page arguments' => array(1),
     'access callback' => 'node_access',
     'access arguments' => array('update', 1),
-    'theme callback' => '_node_custom_theme',
+    'theme callback' => 'system_content_theme_override',
     'weight' => 0,
     'type' => MENU_LOCAL_TASK,
     'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
@@ -1928,7 +1928,7 @@
     'page arguments' => array('node_delete_confirm', 1),
     'access callback' => 'node_access',
     'access arguments' => array('delete', 1),
-    'theme callback' => '_node_custom_theme',
+    'theme callback' => 'system_content_theme_override',
     'weight' => 1,
     'type' => MENU_LOCAL_TASK,
     'context' => MENU_CONTEXT_INLINE,
@@ -2007,17 +2007,6 @@
 }
 
 /**
- * Theme callback for creating and editing nodes.
- */
-function _node_custom_theme() {
-  // Use the administration theme if the site is configured to use it for
-  // nodes.
-  if (variable_get('node_admin_theme')) {
-    return variable_get('admin_theme');
-  }
-}
-
-/**
  * Implements hook_init().
  */
 function node_init() {
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.880
diff -u -r1.880 system.module
--- modules/system/system.module	26 Jan 2010 08:29:25 -0000	1.880
+++ modules/system/system.module	28 Jan 2010 21:30:00 -0000
@@ -1732,7 +1732,7 @@
  */
 function system_init() {
   // Add the CSS for this module.
-  if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit' || arg(2) == 'delete'))) {
+  if (arg(0) == 'admin') {
     drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', array('weight' => CSS_SYSTEM));
   }
   drupal_add_css(drupal_get_path('module', 'system') . '/system.css', array('weight' => CSS_SYSTEM));
@@ -3588,3 +3588,29 @@
   );
   return $paths;
 }
+
+/**
+ * Theme callback: overrides the theme with the correct content editing theme.
+ *
+ * This theme callback can be used as a 'theme callback' return value in
+ * hook_menu(), for paths that involve editing or creating content. It will
+ * cause the administration theme to be selected as the page theme if the
+ * 'node_admin_theme' variable is TRUE, and the default theme to be selected
+ * if 'node_admin_theme' is FALSE.
+ *
+ * If the administrative theme is selected, this function also adds the
+ * admin.css file to the page header.
+ *
+ * @see node_menu()
+ * @see system_themes_admin_form()
+ */
+function system_content_theme_override() {
+  // Override default theme with admin theme if the site is configured to use
+  // the admin theme for editing content.
+  if (variable_get('node_admin_theme', '0')) {
+    drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', array('weight' => CSS_SYSTEM));
+    return variable_get('admin_theme');
+  }
+
+  return variable_get('theme_default');
+}
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.106
diff -u -r1.106 system.test
--- modules/system/system.test	25 Jan 2010 10:38:35 -0000	1.106
+++ modules/system/system.test	28 Jan 2010 21:30:00 -0000
@@ -1224,7 +1224,7 @@
   }
 
   function setUp() {
-    parent::setUp();
+    parent::setUp('taxonomy');
 
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer themes', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
