--- modules/taxonomy/taxonomy.module	2008-07-05 19:50:44.000000000 -0500
+++ modules/taxonomy/taxonomyNew.module	2008-12-12 09:54:47.000000000 -0600
@@ -862,21 +862,38 @@ function taxonomy_node_save($nid, $terms
   }
 
   if (is_array($terms)) {
+  	$terms_to_add = array();
+  
     foreach ($terms as $term) {
-      if (is_array($term)) {
+      if (is_array($term)) {      
         foreach ($term as $tid) {
           if ($tid) {
             db_query('INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)', $nid, $tid);
+            
+            $parent_terms = taxonomy_get_parents_all($tid);
+            foreach ($parent_terms as $pt) {
+	            if (!in_array($pt->tid, $terms_to_add)) array_push($terms_to_add, $pt->tid);
+	         }
           }
         }
       }
       else if (is_object($term)) {
         db_query('INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)', $nid, $term->tid);
+        
+        $parent_terms = taxonomy_get_parents_all($term->tid);
+        foreach ($parent_terms as $pt) {
+          if (!in_array($pt->tid, $terms_to_add)) array_push($terms_to_add, $pt->tid);
+        }
       }
       else if ($term) {
         db_query('INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)', $nid, $term);
       }
     }
+    
+    // Add parent terms
+    foreach ($terms_to_add as $tta) {
+      db_query('INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)', $nid, $tta);
+    }    
   }
 }
 
