? 6-x-conf-ignore.patch
? 774692-error.patch
? 775224-settings-conf.patch
Index: domain.bootstrap.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.bootstrap.inc,v
retrieving revision 1.10.2.5
diff -u -p -r1.10.2.5 domain.bootstrap.inc
--- domain.bootstrap.inc	25 Apr 2010 21:42:48 -0000	1.10.2.5
+++ domain.bootstrap.inc	29 Apr 2010 15:43:45 -0000
@@ -243,37 +243,3 @@ function domain_get_primary_table($table
   }
   return db_escape_table($table);
 }
-
-/**
- * Unserialize an object stored in {domain_*} tables.
- *
- * PostGRES has issues with bytea fields, and while this is
- * handled cleanly in cache_get(), we have our own functions
- * for retrieving similar data objects. So we must be sure to
- * unserialize these safely.
- *
- * @param $object
- *   The serialized object.
- * @return $data
- *   Properly unserialized data or an empty string if the $object
- *   contained no data.
- *
- * @see http://drupal.org/node/686146
- */
-function domain_unserialize($object) {
-  if (empty($object)) {
-    return;
-  }
-  return unserialize(db_decode_blob($object));
-}
-
-/**
- * Store the initially loaded domain, for later use.
- */
-function domain_initial_domain($domain = array()) {
-  static $initial;
-  if (!isset($initial) && !empty($domain)) {
-    $initial = $domain;
-  }
-  return $initial;
-}
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.134.2.21
diff -u -p -r1.134.2.21 domain.module
--- domain.module	27 Apr 2010 23:02:40 -0000	1.134.2.21
+++ domain.module	29 Apr 2010 15:43:49 -0000
@@ -62,6 +62,7 @@ function domain_init() {
 
   // Error handling in case the module is not installed correctly.
   if (!isset($_domain['domain_id'])) {
+    $_domain = domain_default();
     $_domain['error'] = '-1';
   }
   // If $_domain['error'] is present, then set a message and stop.
@@ -69,13 +70,18 @@ function domain_init() {
     $error = 'Domain access failed to load during phase: '. $_domain['error'] .'. Please check your settings.php file and site configuration.';
     // Do not show on form submissions, when enabling the module.
     if (empty($_POST)) {
-      // Show a warning to admin users.
-      if (user_access('administer domains')) {
+      // Show a warning to admin users, if enabled.
+      // You may disable this warning by adding:
+      // $conf['domain_hide_errors'] = TRUE;
+      // to the bottom of settings.php.
+      $hide = variable_get('domain_hide_errors', FALSE);
+      if (user_access('administer domains') && empty($hide)) {
         drupal_set_message($error, 'error');
       }
-      watchdog('Domain Access', $error, NULL, WATCHDOG_ERROR);
+      if (empty($hide)) {
+        watchdog('Domain Access', $error, NULL, WATCHDOG_ERROR);
+      }
     }
-    return;
   }
   // End of the error handling routine.
 
@@ -115,6 +121,40 @@ function domain_init() {
 }
 
 /**
+ * Store the initially loaded domain, for later use.
+ */
+function domain_initial_domain($domain = array()) {
+  static $initial;
+  if (!isset($initial) && !empty($domain)) {
+    $initial = $domain;
+  }
+  return $initial;
+}
+
+/**
+ * Unserialize an object stored in {domain_*} tables.
+ *
+ * PostGRES has issues with bytea fields, and while this is
+ * handled cleanly in cache_get(), we have our own functions
+ * for retrieving similar data objects. So we must be sure to
+ * unserialize these safely.
+ *
+ * @param $object
+ *   The serialized object.
+ * @return $data
+ *   Properly unserialized data or an empty string if the $object
+ *   contained no data.
+ *
+ * @see http://drupal.org/node/686146
+ */
+function domain_unserialize($object) {
+  if (empty($object)) {
+    return;
+  }
+  return unserialize(db_decode_blob($object));
+}
+
+/**
  * Implement hook_menu()
  */
 function domain_menu() {
