Index: plugins/views_plugin_display.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/views_plugin_display.inc,v
retrieving revision 1.20.2.52
diff -u -r1.20.2.52 views_plugin_display.inc
--- plugins/views_plugin_display.inc	15 Dec 2010 23:35:55 -0000	1.20.2.52
+++ plugins/views_plugin_display.inc	18 Dec 2010 01:23:15 -0000
@@ -248,7 +248,17 @@
    * Can this display accept attachments?
    */
   function accept_attachments() {
-    return !empty($this->definition['accept attachments']);
+    if (empty($this->definition['accept attachments'])) {
+      return FALSE;
+    }
+    if (!empty($this->view->argument) && $this->get_option('hide_attachment_summary')) {
+      foreach ($this->view->argument as $argument_id => $argument) {
+        if ($argument->needs_style_plugin() && empty($argument->argument_validated)) {
+          return FALSE;
+        }
+      }
+    }
+    return TRUE;
   }
 
   /**
@@ -268,6 +278,7 @@
       'enabled' => array('enabled'),
       'css_class' => array('css_class'),
       'use_ajax' => array('use_ajax'),
+      'hide_attachment_summary' => array('hide_attachment_summary'),
       'query' => array('query'),
       'items_per_page' => array('items_per_page', 'offset', 'use_pager', 'pager_element'),
       'pager' => array('pager'),
@@ -322,6 +333,7 @@
 
           'display_description' => FALSE,
           'use_ajax' => TRUE,
+          'hide_attachment_summary' => TRUE,
           'items_per_page' => TRUE,
           'use_pager' => TRUE,
           'offset' => TRUE,
@@ -375,6 +387,10 @@
         'default' => FALSE,
         'bool' => TRUE,
       ),
+      'hide_attachment_summary' => array(
+        'default' => FALSE,
+        'bool' => TRUE,
+      ),
       'items_per_page' => array(
         'default' => 10,
       ),
@@ -920,6 +936,14 @@
         'desc' => t('Change whether or not this display will use AJAX.'),
       );
     }
+    if (!empty($this->definition['accept attachments'])) {
+      $options['hide_attachment_summary'] = array(
+        'category' => 'advanced',
+        'title' => t('Hide attachments in summary'),
+        'value' => $this->get_option('hide_attachment_summary') ? t('Yes') : t('No'),
+        'desc' => t('Change whether or not to display attachments when displaying an argument summary.'),
+      );
+    }
 
     $pager_plugin = $this->get_plugin('pager');
     if (!$pager_plugin) {
@@ -1167,6 +1191,14 @@
           '#default_value' => $this->get_option('use_ajax') ? 1 : 0,
         );
         break;
+      case 'hide_attachment_summary':
+        $form['#title'] .= t('Hide attachments when displaying argument summary');
+        $form['hide_attachment_summary'] = array(
+          '#type' => 'radios',
+          '#options' => array(1 => t('Yes'), 0 => t('No')),
+          '#default_value' => $this->get_option('hide_attachment_summary') ? 1 : 0,
+        );
+        break;
       case 'use_more':
         $form['#title'] .= t('Add a more link to the bottom of the display.');
         $form['use_more'] = array(
@@ -1882,6 +1914,7 @@
         break;
       case 'enabled':
       case 'use_ajax':
+      case 'hide_attachment_summary':
         $this->set_option($section, (bool)$form_state['values'][$section]);
         break;
       case 'use_more':
