? 6-validate.patch
? 6-x-conf-ignore.patch
? 624360-redirect.patch
? 63220-generate.patch
? generate_2.patch
? views.patch
? domain_views/includes/domain_views_plugin_disable.inc
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.134.2.1
diff -u -p -r1.134.2.1 domain.module
--- domain.module	16 Nov 2009 21:25:49 -0000	1.134.2.1
+++ domain.module	17 Nov 2009 21:12:07 -0000
@@ -1226,12 +1226,19 @@ function domain_get_node_domains($nid) {
  * all users are in the realm defined by the currently active domain_id.
  */
 function domain_node_grants($account, $op) {
-  global $_domain;
+  global $_domain, $conf;
   $grants = array();
 
   // Do we need to use complex rules?
   $rules = variable_get('domain_access_rules', FALSE);
 
+  // Allow all from Views? This is a transient variable.
+  $all = variable_get('domain_access_disable', FALSE);
+  if ($all) {
+    $conf['domain_access_disable'] = FALSE;
+    return array('domain_all' => array(0));
+  }
+
   // By design, all users can see content sent to all affiliates,
   // but the $_domain['site_grant'] can be set to FALSE.
   if ($op == 'view') {
@@ -2360,8 +2367,9 @@ function domain_simpletest() {
 function domain_db_rewrite_sql($query, $primary_table, $primary_field, $args) {
   global $_domain;
   $admin_force = variable_get('domain_force_admin', FALSE);
+  $all = variable_get('domain_access_disable', FALSE);
   // In any of the following cases, do not enforce any rules.
-  if (!$admin_force || $primary_field != 'nid' || !user_access('administer nodes') || domain_grant_all()) {
+  if (!$admin_force || $primary_field != 'nid' || !user_access('administer nodes') || domain_grant_all() || $all) {
     return;
   }
   $domain_id = (int) $_domain['domain_id'];
Index: domain_views/domain_views.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_views/Attic/domain_views.module,v
retrieving revision 1.13
diff -u -p -r1.13 domain_views.module
--- domain_views/domain_views.module	11 Oct 2009 19:07:51 -0000	1.13
+++ domain_views/domain_views.module	17 Nov 2009 21:12:09 -0000
@@ -155,3 +155,10 @@ function _domain_views_alter_grants(&$gr
     }
   }
 }
+
+function domain_views_query_alter(&$view, &$query) {
+  global $conf;
+  if ($query->base_table == 'node' && $query->base_field == 'nid') {
+    $conf['domain_access_disable'] = TRUE;
+  }
+}
Index: domain_views/domain_views.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_views/Attic/domain_views.views.inc,v
retrieving revision 1.13
diff -u -p -r1.13 domain_views.views.inc
--- domain_views/domain_views.views.inc	24 Oct 2009 16:18:52 -0000	1.13
+++ domain_views/domain_views.views.inc	17 Nov 2009 21:12:09 -0000
@@ -318,6 +318,28 @@ function domain_views_views_plugins() {
         'parent' => 'fixed', // so that the parent class is included
       ),
     ),
+    'domain' => array(
+      'parent' => array(
+        // this isn't really a display but is necessary so the file can
+        // be included.
+        'handler' => 'views_plugin',
+        'parent' => '',
+      ),
+      'disabled' => array(
+        'title' => t('Off'),
+        'help' => t('Domain access will be enforced on this view.'),
+        'handler' => 'domain_views_plugin_disable',
+        'uses options' => TRUE,
+        'type' => 'normal',
+      ),
+      'enabled' => array(
+        'title' => t('On'),
+        'help' => t('Domain access will not be enforced on this view.'),
+        'handler' => 'domain_views_plugin_disable',
+        'uses options' => TRUE,
+        'type' => 'normal',
+      ),
+    ),
   );
 }
 
