? cck-group-by.patch
? content-relationships.patch
? panels.patch
? relationships.patch
Index: content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/Attic/content.module,v
retrieving revision 1.301.2.118
diff -u -p -r1.301.2.118 content.module
--- content.module	30 Aug 2009 14:16:55 -0000	1.301.2.118
+++ content.module	4 Nov 2009 19:04:04 -0000
@@ -2476,7 +2476,7 @@ function content_content_extra_fields($t
       'description' => t('Comment module form.'),
       'weight' => 30
     );
-  }  
+  }
   if (module_exists('locale') && variable_get("language_content_type_$type_name", 0)) {
     $extra['language'] = array(
       'label' => t('Language'),
Index: includes/views/handlers/content_handler_field.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/views/handlers/Attic/content_handler_field.inc,v
retrieving revision 1.1.2.17
diff -u -p -r1.1.2.17 content_handler_field.inc
--- includes/views/handlers/content_handler_field.inc	22 Jul 2009 20:46:55 -0000	1.1.2.17
+++ includes/views/handlers/content_handler_field.inc	4 Nov 2009 19:04:04 -0000
@@ -24,11 +24,14 @@ class content_handler_field extends view
     if ($field['multiple']) {
       $this->additional_fields['delta'] = 'delta';
     }
+
     // Make sure we grab enough information to build a pseudo-node with enough
     // credentials at render-time.
-    $this->additional_fields['type'] = array('table' => 'node', 'field' => 'type');
-    $this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid');
-    $this->additional_fields['vid'] = array('table' => 'node', 'field' => 'vid');
+    if (!method_exists($this->view->display_handler, 'use_group_by') || !$this->view->display_handler->use_group_by()) {
+      $this->additional_fields['type'] = array('table' => 'node', 'field' => 'type');
+      $this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid');
+      $this->additional_fields['vid'] = array('table' => 'node', 'field' => 'vid');
+    }
   }
 
   function options(&$options) {
@@ -167,20 +170,27 @@ class content_handler_field extends view
   }
 
   function render($values) {
+    if (!method_exists($this->view->display_handler, 'use_group_by') || !$this->view->display_handler->use_group_by()) {
+      // Build a pseudo-node from the retrieved values.
+      $node = drupal_clone($values);
+      $node->type = $values->{$this->aliases['type']};
+      $node->nid = $values->{$this->aliases['nid']};
+      $node->vid = $values->{$this->aliases['vid']};
+      // Some formatters need to behave differently depending on the build_mode
+      // (for instance: preview), so we provide one.
+      $node->build_mode = NODE_BUILD_NORMAL;
+      $field = content_fields($this->content_field['field_name'], $values->{$this->aliases['type']});
+    }
+    else {
+      $node = NULL;
+      $field = content_fields($this->content_field['field_name'], NULL);
+    }
+
     // We're down to a single node here, so we can retrieve the actual field
     // definition for the node type being considered.
-    $field = content_fields($this->content_field['field_name'], $values->{$this->aliases['type']});
     $options = $this->options;
     $db_info = content_database_info($field);
 
-    // Build a pseudo-node from the retrieved values.
-    $node = drupal_clone($values);
-    $node->type = $values->{$this->aliases['type']};
-    $node->nid = $values->{$this->aliases['nid']};
-    $node->vid = $values->{$this->aliases['vid']};
-    // Some formatters need to behave differently depending on the build_mode
-    // (for instance: preview), so we provide one.
-    $node->build_mode = NODE_BUILD_NORMAL;
 
     $item = array();
     foreach ($db_info['columns'] as $column => $attributes) {
Index: includes/views/handlers/content_handler_field_multiple.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/views/handlers/Attic/content_handler_field_multiple.inc,v
retrieving revision 1.1.2.22
diff -u -p -r1.1.2.22 content_handler_field_multiple.inc
--- includes/views/handlers/content_handler_field_multiple.inc	22 Jul 2009 20:45:17 -0000	1.1.2.22
+++ includes/views/handlers/content_handler_field_multiple.inc	4 Nov 2009 19:04:05 -0000
@@ -59,45 +59,54 @@ class content_handler_field_multiple ext
       '#access' => $field['multiple'],
       '#weight' => 1,
     );
-    $form['multiple']['group'] = array(
-      '#title' => t('Group multiple values'),
-      '#type' => 'checkbox',
-      '#default_value' => $options['multiple']['group'],
-      '#description' => t('If unchecked, each item in the field will create a new row, which may appear to cause duplicates. This setting is not compatible with click-sorting in table displays.'),
-    );
-    // Make the string translatable by keeping it as a whole rather than
-    // translating prefix and suffix separately.
-    list($prefix, $suffix) = explode('@count', t('Show @count value(s)'));
-    $form['multiple']['multiple_number'] = array(
-      '#type' => 'textfield',
-      '#size' => 5,
-      '#field_prefix' => $prefix,
-      '#field_suffix' => $suffix,
-      '#default_value' => $options['multiple']['multiple_number'],
-      '#prefix' => '<div class="container-inline">',
-      '#process' => array('views_process_dependency'),
-      '#dependency' => array('edit-options-multiple-group' => array(TRUE)),
-    );
-    list($prefix, $suffix) = explode('@count', t('starting from @count'));
-    $form['multiple']['multiple_from'] = array(
-      '#type' => 'textfield',
-      '#size' => 5,
-      '#field_prefix' => $prefix,
-      '#field_suffix' => $suffix,
-      '#default_value' => $options['multiple']['multiple_from'],
-      '#process' => array('views_process_dependency'),
-      '#dependency' => array('edit-options-multiple-group' => array(TRUE)),
-      '#description' => t('(first item is 0)'),
-    );
-    $form['multiple']['multiple_reversed'] = array(
-      '#title' => t('Reversed'),
-      '#type' => 'checkbox',
-      '#default_value' => $options['multiple']['multiple_reversed'],
-      '#suffix' => '</div>',
-      '#process' => array('views_process_dependency'),
-      '#dependency' => array('edit-options-multiple-group' => array(TRUE)),
-      '#description' => t('(start from last values)'),
-    );
+
+    if (!method_exists($this->view->display_handler, 'use_group_by') || !$this->view->display_handler->use_group_by()) {
+      $form['multiple']['group'] = array(
+        '#title' => t('Group multiple values'),
+        '#type' => 'checkbox',
+        '#default_value' => $options['multiple']['group'],
+        '#description' => t('If unchecked, each item in the field will create a new row, which may appear to cause duplicates. This setting is not compatible with click-sorting in table displays.'),
+      );
+      // Make the string translatable by keeping it as a whole rather than
+      // translating prefix and suffix separately.
+      list($prefix, $suffix) = explode('@count', t('Show @count value(s)'));
+      $form['multiple']['multiple_number'] = array(
+        '#type' => 'textfield',
+        '#size' => 5,
+        '#field_prefix' => $prefix,
+        '#field_suffix' => $suffix,
+        '#default_value' => $options['multiple']['multiple_number'],
+        '#prefix' => '<div class="container-inline">',
+        '#process' => array('views_process_dependency'),
+        '#dependency' => array('edit-options-multiple-group' => array(TRUE)),
+      );
+      list($prefix, $suffix) = explode('@count', t('starting from @count'));
+      $form['multiple']['multiple_from'] = array(
+        '#type' => 'textfield',
+        '#size' => 5,
+        '#field_prefix' => $prefix,
+        '#field_suffix' => $suffix,
+        '#default_value' => $options['multiple']['multiple_from'],
+        '#process' => array('views_process_dependency'),
+        '#dependency' => array('edit-options-multiple-group' => array(TRUE)),
+        '#description' => t('(first item is 0)'),
+      );
+      $form['multiple']['multiple_reversed'] = array(
+        '#title' => t('Reversed'),
+        '#type' => 'checkbox',
+        '#default_value' => $options['multiple']['multiple_reversed'],
+        '#suffix' => '</div>',
+        '#process' => array('views_process_dependency'),
+        '#dependency' => array('edit-options-multiple-group' => array(TRUE)),
+        '#description' => t('(start from last values)'),
+      );
+    }
+    else {
+      $form['multiple']['group'] = array(
+        '#type' => 'value',
+        '#value' => FALSE,
+      );
+    }
   }
 
   /**
