In 6.x, we added a feature so that hook_db_rewrite_sql() could be used to restrict the comments shown in comment_render(). http://drupal.org/node/216504 fixes critical bugs with this feature, however there are a couple other stragglers.
One of them is that the queries in comment_num_all() and comment_num_new() /aren't/ run through db_rewrite_sql, which results in a user seeing "3 comments / 1 new comment" but then clicking in and only seeing one old one, for example.
I didn't mark this one critical, because it's not spewing SQL errors like the other referenced one, but it still makes the db_rewrite_sql() feature pretty useless without it.
Comments
Comment #1
ged3000 commentedIs this soon to be irrelevant, because of Replace db_rewrite_sql() with hook_query_alter()? (For 7.x, at any rate)
Also, comment_num_all() is no longer used in 7.x. When the number of comments is loaded in comment_render, db_rewrite_sql() is called:
API entry.
Similarly for comment_get_recent() not run through db_rewrite_sql()
Postpone this issue?
Comment #2
davyvdb commentedThis is irrelevant now I guess too.
Comment #3
cburschkaNeeds review isn't the right state for that, though.
I'll mark it duplicate since the feature is effectively in with hook_query alter.