Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
comment.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Dec 2005 at 15:19 UTC
Updated:
21 Jun 2007 at 17:54 UTC
Jump to comment: Most recent file
Comments
Comment #1
killes@www.drop.org commentedShouldn't that be db_rewrite_sql($query, 'c', 'cid')?
Comment #2
drummYep, here is a revised patch.
Comment #3
chx commentedWell, we promised nid, tid, vid, cid in the beginning of db_rewrite_sql so... yes, this is needed.
Comment #4
dries commentedIMO, this patch is a bit of a hack. It allows you to rewrite the query for the comment block, but not for any of the other comment module's queries. It gives the false impression that you can use it to control access to comments, while the best you can do with it is, is implement 'recent comment' block that hides some comments.
Comment #5
markus_petrux commentedI agree with drumm this is needed for contrib modules that manage information related to comments.
But I also agree with Dries, there are more queries that would need to be hook_db_rewrite_sql aware.
Can we compile the list of such queries? Then we can work out a patch.
Proposed list of function that maybe need to use db_rewrite_sql:
* comment_edit()
* comment_reply()
* comment_render()
* comment_admin_overview()
* _comment_load()
* comment_form_add_preview()
Comment #6
killes@www.drop.org commentedReclassifying as a bug.
I am not sure this patch makes sense. Our access scheme is geared at nodes, not comments. That means anybody who can see a node should be able to see all publushed comments, too.
The comment block already has already a rewrite function.
So I tend to mark this "won't fix".
Comment #7
drummhttp://drupal.org/node/128165