The query is using $nids
It should be $cids.

Patch attached.

CommentFileSizeAuthor
#1 cids.patch0 bytescirotix
cids.patch0 bytescirotix

Comments

cirotix’s picture

StatusFileSize
new0 bytes

wrong file

cirotix’s picture

lets try again; sorry for the flood :(
It seems that all my uploaded files are empty.
I copy and paste here, the patch is dumb simple after all

Index: flag.module
===================================================================
--- flag.module (revision 699)
+++ flag.module (working copy)
@@ -781,7 +781,7 @@

   if ($flag->content_type == 'comment') {
     // Restrict access by comment ownership.
-    $nids = implode(',', array_map('intval', array_keys($content_ids)));
+    $cids = implode(',', array_map('intval', array_keys($content_ids)));
     $result = db_query("SELECT c.cid, c.nid, c.uid as comment_uid, n.nid as node_uid FROM {comments} c LEFT JOIN {node} n ON c.nid = n.nid WHERE cid IN ($cids)");
     while ($row = db_fetch_object($result)) {
       if ($flag->access_author == 'node_own') {
quicksketch’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.