Index: views/plugins/project_plugin_argument_validate_project_type_term.inc
===================================================================
RCS file: /Users/wright/drupal/local_repo/contributions/modules/project/views/plugins/project_plugin_argument_validate_project_type_term.inc,v
retrieving revision 1.3
diff -u -p -r1.3 project_plugin_argument_validate_project_type_term.inc
--- views/plugins/project_plugin_argument_validate_project_type_term.inc	8 Jul 2010 23:16:17 -0000	1.3
+++ views/plugins/project_plugin_argument_validate_project_type_term.inc	20 Aug 2010 23:30:51 -0000
@@ -7,19 +7,6 @@
  */
 class project_plugin_argument_validate_project_type_term extends views_plugin_argument_validate {
   function validate_form(&$form, &$form_state) {
-    // Vocabularies
-    $form['validate_argument_project_term_vocabulary'] = array(
-      '#type' => 'checkboxes',
-      '#prefix' => '<div id="edit-options-validate-argument-project-term-vocabulary-wrapper">',
-      '#suffix' => '</div>',
-      '#title' => t('Vocabularies'),
-      '#options' => _project_views_plugin_argument_validate_project_vocabulary(),
-      '#default_value' => isset($this->argument->options['validate_argument_project_term_vocabulary']) ? $this->argument->options['validate_argument_project_term_vocabulary'] : array(),
-      '#description' => t('If you wish to validate for specific vocabularies, check them; if none are checked, all arguments will fail validation.'),
-      '#process' => array('expand_checkboxes', 'views_process_dependency'),
-      '#dependency' => array('edit-options-validate-type' => array($this->id)),
-    );
-
     // Argument type
     $form['validate_argument_project_term_argument_type'] = array(
       '#type' => 'select',
@@ -77,16 +64,16 @@ class project_plugin_argument_validate_p
   }
 
   function validate_argument($argument) {
-    $vids = isset($this->argument->options['validate_argument_project_term_vocabulary']) ? array_filter($this->argument->options['validate_argument_project_term_vocabulary']) : array();
+    $vid = _project_get_vid();
+    if (empty($vid)) {
+      return FALSE;
+    }
+
     $type = isset($this->argument->options['validate_argument_project_term_argument_type']) ? $this->argument->options['validate_argument_project_term_argument_type'] : 'tid';
     $action_top_without = isset($this->argument->options['validate_argument_project_term_argument_action_top_without']) ? $this->argument->options['validate_argument_project_term_argument_action_top_without'] : 'pass';
     $action_top_with = isset($this->argument->options['validate_argument_project_term_argument_action_top_with']) ? $this->argument->options['validate_argument_project_term_argument_action_top_with'] : 'pass';
     $action_child = isset($this->argument->options['validate_argument_project_term_argument_action_child']) ? $this->argument->options['validate_argument_project_term_argument_action_child'] : 'pass';
 
-    // If no vocabularies were selected in the options form, we can fail right away.
-    if (empty($vids)) {
-      return FALSE;
-    }
 
     // First we check to determine whether the argument is a term in the project type vocabulary.
     // If not, we know the argument won't validate, and we can return FALSE.  The other added benefit
@@ -101,7 +88,7 @@ class project_plugin_argument_validate_p
         if (!$result) {
           return FALSE;
         }
-        elseif (empty($vids[$result->vid])) {
+        elseif ($result->vid != $vid) {
           return FALSE;
         }
         break;
@@ -109,8 +96,8 @@ class project_plugin_argument_validate_p
       case 'name':
       case 'convert':
         $query_args = array($argument, $argument);
-        $query_args = array_merge($query_args, $vids);
-        $result = db_fetch_object(db_query(db_rewrite_sql("SELECT td.tid, td.vid, td.name, td.description, td.weight, th.parent FROM {term_data} td LEFT JOIN {term_synonym} ts ON ts.tid = td.tid LEFT JOIN {term_hierarchy} th ON th.tid = td.tid WHERE (td.name = '%s' OR ts.name = '%s') AND td.vid IN(" . db_placeholders($vids) . ")", 'td', 'tid'), $query_args));
+        $query_args = array_merge($query_args, array($vid));
+        $result = db_fetch_object(db_query(db_rewrite_sql("SELECT td.tid, td.vid, td.name, td.description, td.weight, th.parent FROM {term_data} td LEFT JOIN {term_synonym} ts ON ts.tid = td.tid LEFT JOIN {term_hierarchy} th ON th.tid = td.tid WHERE (td.name = '%s' OR ts.name = '%s') AND td.vid = %d", 'td', 'tid'), $query_args));
         if (!$result) {
           return FALSE;
         }
@@ -149,20 +136,3 @@ class project_plugin_argument_validate_p
     }
   }
 }
-
-/**
- * Return an array containing the project type vocabulary
- * formatted to be used in the argument validator options form.
- */
-function _project_views_plugin_argument_validate_project_vocabulary() {
-  $vid = _project_get_vid();
-  if (!empty($vid)) {
-    $vocabulary = taxonomy_vocabulary_load($vid);
-  }
-  
-  $options = array();
-  if (!empty($vocabulary)) {
-    $options[$vocabulary->vid] = $vocabulary->name;
-  }
-  return $options;
-}
