? 733964-sort-current.patch
? 771454-notices.patch
? test.patch
Index: domain.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.admin.inc,v
retrieving revision 1.60
diff -u -p -r1.60 domain.admin.inc
--- domain.admin.inc	25 Apr 2010 21:58:33 -0000	1.60
+++ domain.admin.inc	27 Apr 2010 17:01:14 -0000
@@ -605,7 +605,12 @@ function domain_delete_form_submit($form
 function domain_advanced_form($form, $form_state) {
   $form = array();
   $node_types = node_type_get_names();
-  $default = variable_get('domain_behavior', DOMAIN_INSTALL_RULE);
+  // In D7, type handling is strict, so make this value 0 or 1.
+  // @TODO: clean up DOMAIN_INSTALL handling.
+  $default = (int) variable_get('domain_behavior', DOMAIN_INSTALL_RULE);
+  if ($default == 2) {
+    $default = 0;
+  }
   $form['domain_node'] = array(
     '#type' => 'fieldset',
     '#title' => t('Domain node types'),
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.184
diff -u -p -r1.184 domain.module
--- domain.module	27 Apr 2010 14:21:31 -0000	1.184
+++ domain.module	27 Apr 2010 17:01:17 -0000
@@ -1775,7 +1775,12 @@ function domain_form_alter(&$form, &$for
   // By default, the requesting domain is assigned.
   $default = array($_domain['domain_id']);
   // How is core content handled for this site?
-  $behavior = variable_get('domain_behavior', DOMAIN_INSTALL_RULE);
+  // In D7, type handling is strict, so make this value 0 or 1.
+  // @TODO: clean up DOMAIN_INSTALL handling.
+  $behavior = (int) variable_get('domain_behavior', DOMAIN_INSTALL_RULE);
+  if ($behavior == 2) {
+    $behavior = 0;
+  }
   if ($_domain['domain_id'] == 0) {
     $default[] = -1;
   }
@@ -1902,7 +1907,7 @@ function domain_form_alter(&$form, &$for
           );
           // We must preserve publishing options that the user cannot access, but only for
           // existing nodes.
-          if ($form['#node']->nid) {
+          if (!empty($form['#node']->nid)) {
             $raw = $raw_options;
           }
           else {
@@ -1925,7 +1930,7 @@ function domain_form_alter(&$form, &$for
           }
           // Show the options that cannot be changed.
           $list = array();
-          if ($form['#node']->domain_site) {
+          if (!empty($form['#node']->domain_site)) {
             $list[]['data'] = t('All affiliates');
           }
           if (!empty($raw)) {
