Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.85
diff -u -p -r1.85 content_types.inc
--- modules/node/content_types.inc	9 Aug 2009 01:15:33 -0000	1.85
+++ modules/node/content_types.inc	11 Aug 2009 16:44:27 -0000
@@ -115,6 +115,11 @@ function node_type_form(&$form_state, $t
     '#title' => t('Submission form settings'),
     '#collapsible' => TRUE,
   );
+  $form['submission']['admin'] = array(
+    '#title' => t('Use administration theme to submit and edit'),
+    '#type' => 'checkbox',
+    '#default_value' => $type->admin,
+  );
   $form['submission']['title_label'] = array(
     '#title' => t('Title field label'),
     '#type' => 'textfield',
@@ -284,6 +289,7 @@ function node_type_form_submit($form, &$
   $type->orig_type = trim($form_state['values']['orig_type']);
   $type->old_type = isset($form_state['values']['old_type']) ? $form_state['values']['old_type'] : $type->type;
 
+  $type->admin = $form_state['values']['admin'];
   $type->description = $form_state['values']['description'];
   $type->help = $form_state['values']['help'];
   $type->title_label = $form_state['values']['title_label'];
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.25
diff -u -p -r1.25 node.install
--- modules/node/node.install	27 Jul 2009 19:26:31 -0000	1.25
+++ modules/node/node.install	11 Aug 2009 16:44:27 -0000
@@ -327,6 +327,12 @@ function node_schema() {
         'not null' => TRUE,
         'default' => '',
       ),
+      'admin' => array(
+        'description' => 'Boolean indicating whether the interface for editing and submitting nodes of this type should be the administration or the front end UI.',
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 1,
+      ),
     ),
     'primary key' => array('type'),
   );
@@ -525,7 +531,17 @@ function node_update_7006() {
   return $ret;
 }
 
-
+/**
+ * Set the admin flag on existing node types per previous global setting.
+ */
+function node_update_7007() {
+  $ret = array();
+  $use_admin_theme = (int) variable_get('node_admin_theme', 0);
+  db_add_field($ret, 'node_type', 'admin', array('type' => 'int', 'not null' => TRUE, 'default' => 1));
+  $ret[] = update_sql("UPDATE {node_type} SET admin = ". $use_admin_theme);
+  variable_del('node_admin_theme');
+  return $ret;
+}
 
 /**
  * @} End of "defgroup updates-6.x-to-7.x"
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1095
diff -u -p -r1.1095 node.module
--- modules/node/node.module	8 Aug 2009 22:52:59 -0000	1.1095
+++ modules/node/node.module	11 Aug 2009 16:44:27 -0000
@@ -419,6 +419,7 @@ function node_type_save($info) {
     'custom' => (int) $type->custom,
     'modified' => (int) $type->modified,
     'locked' => (int) $type->locked,
+    'admin' => (int) $type->admin,
   );
 
   if ($is_existing) {
@@ -618,6 +619,7 @@ function node_type_set_defaults($info = 
     $type->modified = 0;
     $type->locked = 1;
     $type->is_new = 1;
+    $type->admin = 1;
   }
 
   $new_type = clone $type;
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.170
diff -u -p -r1.170 system.admin.inc
--- modules/system/system.admin.inc	11 Aug 2009 11:52:46 -0000	1.170
+++ modules/system/system.admin.inc	11 Aug 2009 16:44:27 -0000
@@ -267,12 +267,6 @@ function system_themes_form() {
     '#description' => t('Choose which theme the administration pages should display in. If you choose "Default theme" the administration pages will use the same theme as the rest of the site.'),
     '#default_value' => variable_get('admin_theme', 0),
   );
-  $form['admin_theme']['node_admin_theme'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Use administration theme for content editing'),
-    '#description' => t('Use the administration theme when editing existing posts or creating new ones.'),
-    '#default_value' => variable_get('node_admin_theme', '0'),
-  );
 
   $form['buttons']['submit'] = array(
     '#type' => 'submit',
@@ -325,13 +319,11 @@ function system_themes_form_submit($form
     // Save the variables.
     variable_set('theme_default', $form_state['values']['theme_default']);
     variable_set('admin_theme', $form_state['values']['admin_theme']);
-    variable_set('node_admin_theme', $form_state['values']['node_admin_theme']);
   }
   else {
     // Revert to defaults: only Garland is enabled.
     variable_del('theme_default');
     variable_del('admin_theme');
-    variable_del('node_admin_theme');
     db_update('system')
       ->fields(array('status' => 1))
       ->condition('type', 'theme')
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.738
diff -u -p -r1.738 system.module
--- modules/system/system.module	11 Aug 2009 11:52:46 -0000	1.738
+++ modules/system/system.module	11 Aug 2009 16:44:27 -0000
@@ -1326,8 +1326,17 @@ function _system_filetransfer_backend_fo
  * Implement hook_init().
  */
 function system_init() {
-  // Use the administrative theme if the user is looking at a page in the admin/* path.
-  if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit'))) {
+  // Use the administrative theme if the user is looking at a page in the
+  // administration area or submitting or editing a node which should show
+  // with the administrative user interface.
+  $node_type = NULL;
+  if (($node = menu_get_object()) && (arg(2) == 'edit')) {
+    $node_type = node_type_get_type($node);
+  }
+  if ((arg(0) == 'node') && (arg(1) == 'add')) {
+    $node_type = node_type_get_type(arg(2));
+  }
+  if (arg(0) == 'admin' || (isset($node_type) && !empty($node_type->admin))) {
     global $custom_theme;
     $custom_theme = variable_get('admin_theme', 0);
     drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', array('weight' => CSS_SYSTEM));
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.62
diff -u -p -r1.62 system.test
--- modules/system/system.test	5 Aug 2009 16:16:41 -0000	1.62
+++ modules/system/system.test	11 Aug 2009 16:44:27 -0000
@@ -919,12 +919,15 @@ class SystemThemeFunctionalTest extends 
    * Test the administration theme functionality.
    */
   function testAdministrationTheme() {
-    // Enable an administration theme and show it on the node admin pages.
+    // Enable an administration theme and show it on the node admin pages
+    // for our node type.
     $edit = array(
       'theme_default' => 'stark',
       'admin_theme' => 'garland',
-      'node_admin_theme' => TRUE,
     );
+    $type = node_type_get_type($this->node);
+    $type->admin = 1;
+    node_type_save($type);
     $this->drupalPost('admin/appearance', $edit, t('Save configuration'));
 
     $this->drupalGet('admin');
@@ -934,15 +937,14 @@ class SystemThemeFunctionalTest extends 
     $this->assertRaw('themes/stark', t('Site default theme used on node page.'));
 
     $this->drupalGet('node/add');
-    $this->assertRaw('themes/garland', t('Administration theme used on the add content page.'));
+    $this->assertRaw('themes/stark', t('Site default theme used on the add content page.'));
 
     $this->drupalGet('node/' . $this->node->nid . '/edit');
     $this->assertRaw('themes/garland', t('Administration theme used on the edit content page.'));
 
     // Disable the admin theme on the node admin pages.
-    $edit = array(
-      'node_admin_theme' => FALSE,
-    );
+    $type->admin = 0;
+    node_type_save($type);
     $this->drupalPost('admin/appearance', $edit, t('Save configuration'));
 
     $this->drupalGet('admin');
@@ -951,11 +953,13 @@ class SystemThemeFunctionalTest extends 
     $this->drupalGet('node/add');
     $this->assertRaw('themes/stark', t('Site default theme used on the add content page.'));
 
+    $this->drupalGet('node/' . $this->node->nid . '/edit');
+    $this->assertRaw('themes/stark', t('Site default theme used on the edit content page.'));
+
     // Reset to the default theme settings.
     $edit = array(
       'theme_default' => 'garland',
       'admin_theme' => '0',
-      'node_admin_theme' => FALSE,
     );
     $this->drupalPost('admin/appearance', $edit, t('Save configuration'));
 
Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.62
diff -u -p -r1.62 default.profile
--- profiles/default/default.profile	3 Aug 2009 03:04:34 -0000	1.62
+++ profiles/default/default.profile	11 Aug 2009 16:44:27 -0000
@@ -226,7 +226,6 @@ function default_profile_site_setup(&$in
     ->condition('name', 'seven')
     ->execute();
   variable_set('admin_theme', 'seven');
-  variable_set('node_admin_theme', '1');
 }
 
 /**
