=== modified file 'uc_discount.ca.inc'
--- uc_discount.ca.inc	2009-03-13 14:30:16 +0000
+++ uc_discount.ca.inc	2009-05-06 14:54:52 +0000
@@ -82,6 +82,10 @@
 }
 
 function uc_discount_condition_node_term($node, $settings) {
+  if (!isset($node->vid)) {
+    // Assume current revision
+    $node->vid = db_result(db_query("SELECT vid FROM {node} WHERE nid = %d", $node->nid));
+  }
   $node_terms = array_keys(taxonomy_node_get_terms($node));
 
   // Convert tags into term ids.
@@ -109,13 +113,14 @@
     }
   }
 
-  $and_result = TRUE;
-  $or_result = FALSE;
   foreach ($settings['taxonomy'] as $vid => $terms) {
     // Skip vocabularies with no chosen terms.
     if (empty($terms)) {
       continue;
     }
+    if (!is_array($terms)) {
+      $terms = array($terms);
+    }
 
     // Get the chosen terms that the node actually has.
     $has_terms = array_intersect($terms, $node_terms);
@@ -124,7 +129,8 @@
       // Node must have all chosen terms to return TRUE.
       return FALSE;
     }
-    elseif (count($has_terms)) {
+    elseif ($settings['operator'] == 'OR' && count($has_terms)) {
+      // Node needs just one of the chosen terms to return TRUE.
       return TRUE;
     }
   }

