? enable.patch
Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/CHANGELOG.txt,v
retrieving revision 1.66.2.48
diff -u -p -r1.66.2.48 CHANGELOG.txt
--- CHANGELOG.txt	10 Oct 2008 20:37:05 -0000	1.66.2.48
+++ CHANGELOG.txt	20 Nov 2008 23:38:14 -0000
@@ -1,5 +1,9 @@
 // $Id: CHANGELOG.txt,v 1.66.2.48 2008/10/10 20:37:05 agentken Exp $
 
+20-NOV-2008
+
+-- #300825 by rtbox, fp, awolfey, bribiz and rohnjeynolds.  db_result() error in domain_enable.
+
 10-OCT-2008
 
 -- #319542 by batigolix. Updates install instructions.
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.40.2.25
diff -u -p -r1.40.2.25 domain.module
--- domain.module	22 Oct 2008 02:22:46 -0000	1.40.2.25
+++ domain.module	20 Nov 2008 23:38:16 -0000
@@ -924,17 +924,17 @@ function domain_enable() {
     $edit = variable_get('domain_editors', DOMAIN_EDITOR_RULE);
     $site = DOMAIN_SITE_GRANT;
     $nids = db_query("SELECT nid FROM {node}");
-    while ($nid = db_result($nids)) {
+    while ($nid = db_fetch_object($nids)) {
       if (!empty($site)) {
-        db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid, 0, 'domain_site');
+        db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid->nid, 0, 'domain_site');
       }
       if (!empty($rule)) {
         // By design, all nodes are assigned to the master domain.
-        db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid, 0, 'domain_id');
+        db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid->nid, 0, 'domain_id');
         // Editor rules only apply is nodes are assigned to a domain.
         if (!empty($edit)) {
           variable_set('domain_editors', TRUE);
-          db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid, 0, 'domain_editor');
+          db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid->nid, 0, 'domain_editor');
         }
       }
     }
