--- taxonomy.old	2005-09-12 17:15:57.000000000 -0700
+++ taxonomy.module	2005-09-28 02:38:36.000000000 -0700
@@ -377,7 +377,7 @@
 /**
  * Generate a form element for selecting terms from a vocabulary.
  */
-function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
+function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy', $op = 'create') {
   $vocabulary = taxonomy_get_vocabulary($vid);
   $help = ($help) ? $help : $vocabulary->help;
   if ($vocabulary->required) {
@@ -387,7 +387,7 @@
     $blank = '<'. t('none') .'>';
   }
 
-  return _taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank, array(), 'create');
+  return _taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank, array(), $op);
 }
 
 /**
@@ -439,10 +439,13 @@
  * Generate a form for selecting terms to associate with a node.
  */
 function taxonomy_node_form($type, $node = '', $help = NULL, $name = 'taxonomy') {
+  $op = 'create';
   if (!$node->taxonomy) {
     if ($node->nid) {
       if (function_exists('taxonomy_access')) {
-        $terms = array_keys(taxonomy_node_get_terms($node->nid, 'tid', 'create'));
+      	// if nid exists, we are updating the node
+        $op = 'update';
+        $terms = array_keys(taxonomy_node_get_terms($node->nid, 'tid', $op));
       }
       else {
         $terms = array_keys(taxonomy_node_get_terms($node->nid));
@@ -458,7 +461,7 @@
 
   $c = db_query("SELECT v.*, n.type FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", $type);
   while ($vocabulary = db_fetch_object($c)) {
-    $result[] = taxonomy_form($vocabulary->vid, $terms, $help, $name);
+    $result[] = taxonomy_form($vocabulary->vid, $terms, $help, $name, $op);
   }
   return $result ? $result : array();
 }
