Index: community_tags.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/community_tags/community_tags.module,v
retrieving revision 1.32.2.2
diff -u -r1.32.2.2 community_tags.module
--- community_tags.module	1 Aug 2007 22:38:49 -0000	1.32.2.2
+++ community_tags.module	29 Aug 2007 15:44:32 -0000
@@ -547,7 +547,9 @@
   // Match real tags to community tags, if necessary (e.g. after quick tagging).
   if (!$is_owner) {
     $placeholders = implode(',', array_fill(0, count($community_tagged), '%d'));
-    $result = db_query('SELECT n.tid, n.nid FROM {term_node} n LEFT JOIN {community_tags} c ON n.tid = c.tid AND n.nid = c.nid INNER JOIN {term_data} d ON n.tid = d.tid WHERE n.nid = %d AND c.nid IS NULL AND d.vid IN ('. $placeholders .')', $nid, $community_tagged);
+    $args = $community_tagged;
+    array_unshift($args, $nid);
+    $result = db_query('SELECT n.tid, n.nid FROM {term_node} n LEFT JOIN {community_tags} c ON n.tid = c.tid AND n.nid = c.nid INNER JOIN {term_data} d ON n.tid = d.tid WHERE n.nid = %d AND c.nid IS NULL AND d.vid IN ('. $placeholders .')', $args);
     while ($tag = db_fetch_object($result)) {
       db_query('DELETE FROM {term_node} WHERE nid = %d AND tid = %d', $tag->nid, $tag->tid);
     }

