[drupal-devel] [bug] comment block shows comments from unpublished
nodes
Uwe Hermann
drupal-devel at drupal.org
Sun Sep 18 23:05:30 UTC 2005
Issue status update for
http://drupal.org/node/29866
Post a follow up:
http://drupal.org/project/comments/add/29866
Project: Drupal
-Version: 4.6.2
+Version: cvs
Component: comment.module
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: Florian Hufsky
Updated by: Uwe Hermann
-Status: patch (code needs review)
+Status: patch (ready to be committed)
Attachment: http://drupal.org/files/issues/comment_17.patch (1.1 KB)
Patch rerolled, boldly setting to "ready to be committed".
Uwe Hermann
Previous comments:
------------------------------------------------------------------------
Sun, 28 Aug 2005 16:58:10 +0000 : Florian Hufsky
The comment block shows links comments which were once published, but
later set to "don't publish".
How to reproduce the bug:
1. create a node
2. post a comment
3. edit the node: set uncheck published
Bugfix:
change the sql query for comments to show in comment_block:
modules/comment.module
Line 184
to
SELECT c.nid, c.* FROM {comments} c INNER JOIN {node} n USING (nid)
WHERE n.status = 1 AND c.status = 0 ORDER BY c.timestamp DESC
------------------------------------------------------------------------
Sun, 28 Aug 2005 17:45:07 +0000 : Uwe Hermann
Attachment: http://drupal.org/files/issues/comment_14.patch (1.07 KB)
Confirmed in HEAD. Patch attached. Should probably be backported to 4-6,
too.
More information about the drupal-devel
mailing list