Index: image_pub.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image_pub/image_pub.module,v
retrieving revision 1.11.2.9
diff -u -p -r1.11.2.9 image_pub.module
--- image_pub.module	16 Nov 2008 00:05:37 -0000	1.11.2.9
+++ image_pub.module	2 Jan 2009 00:43:00 -0000
@@ -239,7 +239,8 @@ function _image_pub_image_add($album, $c
   $values['uid'] = $user->uid;
   $values['name'] = $user->name;
   $values['body_filter']['body'] = $description;
-  $redirect_url = drupal_execute('node_form', $values, $node, NULL);
+  $values['taxonomy'][_image_pub_get_vid()] = array($album->tid);
+  $redirect_url = drupal_execute('image_node_form', $values, $node);
 
   // Check that the uploaded image was accepted.
   $errors = form_get_errors();
@@ -248,11 +249,6 @@ function _image_pub_image_add($album, $c
                  'reason' => implode($errors, '. '));
   }
 
-  // If it was accepted, tag it with the the album
-  $arguments = explode('/', $redirect_url);
-  $nid = $arguments[1];
-  taxonomy_node_save($nid, array($album->tid));
-
   watchdog('image_pub', t('%image was added.', array('%image' => $_FILES[$srcfield]['name'])));
   return array('success' => TRUE, 'redirect_url' => $redirect_url);
 }
