diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-04 22:24:40 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-04 22:24:40 +0000 |
commit | 1b503eaac98f303b7227e612f763c2e050913cb2 (patch) | |
tree | 929ee0e3835c3b15e9498232ef23bd5b60c83c7b | |
parent | 92a32a8676c0ca8e3c144bb373a63618be793995 (diff) | |
download | brdo-1b503eaac98f303b7227e612f763c2e050913cb2.tar.gz brdo-1b503eaac98f303b7227e612f763c2e050913cb2.tar.bz2 |
#128165 by joshk and webchick: missing db_rewrite_sql() calls in comment queries
-rw-r--r-- | modules/comment/comment.module | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 1e36560c4..6133ed164 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -983,6 +983,7 @@ function comment_render($node, $cid = 0) { $query_args[] = COMMENT_PUBLISHED; } + $query = db_rewrite_sql($query, 'c', 'cid'); $result = db_query($query, $query_args); if ($comment = db_fetch_object($result)) { @@ -1028,6 +1029,8 @@ function comment_render($node, $cid = 0) { $query .= ' ORDER BY SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))'; } } + $query = db_rewrite_sql($query, 'c', 'cid'); + $query_count = db_rewrite_sql($query_count, 'c', 'cid'); // Start a form, for use with comment control. $result = pager_query($query, $comments_per_page, 0, $query_count, $query_args); @@ -2208,4 +2211,4 @@ function comment_unpublish_by_keyword_action($comment, $context) { break; } } -}
\ No newline at end of file +} |