Index: plugins/arguments/term.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/plugins/arguments/term.inc,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 term.inc
--- plugins/arguments/term.inc	29 Jan 2010 20:18:25 -0000	1.6.2.3
+++ plugins/arguments/term.inc	19 Mar 2010 21:52:41 -0000
@@ -43,10 +43,12 @@
 
     case 'term':
       $terms = taxonomy_get_term_by_name($arg);
-      if (count($terms) != 1) {
+
+      $conf['vids'] = array_filter($conf['vids']);
+      if ((count($terms) > 1) && isset($conf['vids'])) {
         foreach ($terms as $potential) {
           foreach ($conf['vids'] as $vid => $active) {
-            if ($active == 1 && $potential->vid == $vid) {
+            if ($active && $potential->vid == $vid) {
               $term = $potential;
               // break out of the foreaches AND the case
               break 3;
@@ -57,7 +59,6 @@
       $term = array_shift($terms);
       break;
   }
-
   if (empty($term)) {
     return NULL;
   }
@@ -84,6 +85,20 @@
     '#prefix' => '<div class="clear-block">',
     '#suffix' => '</div>',
   );
+  
+  $vocabularies = taxonomy_get_vocabularies();
+  $options = array();
+  foreach ($vocabularies as $vid => $vocab) {
+    $options[$vid] = $vocab->name;
+  }
+  $form['settings']['vids'] = array(
+    '#title' => t('Limit to these vocabularies'),
+    '#type' => 'checkboxes',
+    '#options' => $options,
+    '#default_value' => (array)$conf['vids'],     // Cast to array in case $conf[vids] is empty. 
+    '#prefix' => '<div class="clear-block">',
+    '#suffix' => '</div>',
+  );
 
   $form['settings']['breadcrumb'] = array(
     '#title' => t('Inject hierarchy into breadcrumb trail'),
