diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-30 20:15:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-30 20:15:43 +0000 |
commit | a77601f669c0632b980d8a461eaf57963eff6c31 (patch) | |
tree | 7d55f5e29cdfef982d0b6419647a111909f34d4f /modules/comment/comment.module | |
parent | 92a8adea653b29a9e6ee7778e8628f57b959ca4f (diff) | |
download | brdo-a77601f669c0632b980d8a461eaf57963eff6c31.tar.gz brdo-a77601f669c0632b980d8a461eaf57963eff6c31.tar.bz2 |
- Patch #352337 by catch: avoid unnecessary query in comment render.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index aa27ea651..831544c0e 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1043,7 +1043,8 @@ function comment_render($node, $cid = 0) { $output .= theme('comment_view', $comment, $node, $links); } } - else { + // Only attempt to render comments if the node has been commented upon. + elseif ($node->comment_count) { //TODO Convert to dynamic queries once the pager query is updated to the new DBTNG API. |