? 486370-language-bug.patch
? 490846-user-enable.patch
? domain_views/485762-views.patch
Index: domain_conf/domain_conf.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/domain_conf.admin.inc,v
retrieving revision 1.9
diff -u -p -r1.9 domain_conf.admin.inc
--- domain_conf/domain_conf.admin.inc	8 Apr 2009 18:24:29 -0000	1.9
+++ domain_conf/domain_conf.admin.inc	13 Jun 2009 19:20:00 -0000
@@ -49,6 +49,7 @@ function domain_conf_form($form_state, $
   if (!empty($data)) {
     $settings = unserialize($data);
   }
+
   $default_group = t('Site configuration');
   foreach ($batch as $key => $action) {
     if ($action['#domain_action'] != 'domain_conf') {
@@ -88,6 +89,12 @@ function domain_conf_form($form_state, $
     '#weight' => -100,
   );
 
+  // Locale module is a little tricky, so handle it properly.
+  $str = t('Language settings');
+  if (isset($form[$str]['language_default']) && !isset($settings['language_default'])) {
+    $form[$str]['language_default']['#default_value'] = NULL;
+  }
+
   // Grab any extra elements defined by other modules.
   $extra = domain_conf_api(TRUE);
   // Merge the $extra and $form arrays.
Index: domain_conf/domain_conf.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/domain_conf.module,v
retrieving revision 1.44
diff -u -p -r1.44 domain_conf.module
--- domain_conf/domain_conf.module	7 Jun 2009 18:38:33 -0000	1.44
+++ domain_conf/domain_conf.module	13 Jun 2009 19:20:00 -0000
@@ -37,16 +37,18 @@ function domain_conf_domain_bootstrap_fu
     // Overwrite the $conf variables.
     foreach ($settings as $key => $value) {
       // Language handling is a special case.
-      if ($key == 'language_default') {
+      $language = (bool) db_result(db_query("SELECT status FROM {system} WHERE name = 'locale' AND type = 'module'"));
+      if ($key == 'language_default' && $language) {
         $temp = db_fetch_object(db_query("SELECT * FROM {languages} WHERE language = '%s'", $value));
         if (!empty($temp)) {
           $value = $temp;
-          global $language;
-          $language = $temp;
+          $GLOBALS['language'] = $temp;
+          $conf[$key] = $value;
         }
       }
-      // We store the language variable here as well, for forms.
-      $conf[$key] = $value;
+      else {
+        $conf[$key] = $value;
+      }
     }
   }
 }
@@ -361,24 +363,26 @@ function domain_conf_domainbatch() {
     '#group' => t('Timezone settings'),
   );
   // Change the default language.
-  $languages = domain_conf_language_options();
-  $default = language_default();
-  $batch['language_default'] = array(
-    '#form' => array(
-      '#title' => t('Default language'),
-      '#type' => 'select',
-      '#options' => $languages,
-      '#description' => t('The default language to use for this domain. <em>Note: This setting only works with path-based language switching.</em>'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => $default->language,
-    '#override_default' => TRUE,
-    '#variable' => '', // deliberately empty, since this is an array and cannot be set.
-    '#meta_description' => t('Set the default language for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -3,
-    '#group' => t('Language settings'),
-  );
+  if (module_exists('locale')) {
+    $languages = domain_conf_language_options();
+    $default = language_default();
+    $batch['language_default'] = array(
+      '#form' => array(
+        '#title' => t('Default language'),
+        '#type' => 'select',
+        '#options' => $languages,
+        '#description' => t('The default language to use for this domain. <em>Note: This setting only works with path-based language switching.</em>'),
+      ),
+      '#domain_action' => 'domain_conf',
+      '#system_default' => $default->language,
+      '#override_default' => TRUE,
+      '#variable' => '', // deliberately empty, since this is an array and cannot be set.
+      '#meta_description' => t('Set the default language for all domains.'),
+      '#data_type' => 'string',
+      '#weight' => -3,
+      '#group' => t('Language settings'),
+    );
+  }
   // Toggle the site offline status.
   $batch['site_offline'] = array(
     '#form' => array(
