diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-28 08:37:29 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-28 08:37:29 +0000 |
commit | 033f2f3fdc1a9fd0f2f2b76156e9ac54e1a0d2ed (patch) | |
tree | 59b7a0c00bd684b7adc571ed1b22301ee0a51997 /modules/comment/comment.module | |
parent | 2cb8fb68dec002cfa7683307ba956212f6743ed8 (diff) | |
download | brdo-033f2f3fdc1a9fd0f2f2b76156e9ac54e1a0d2ed.tar.gz brdo-033f2f3fdc1a9fd0f2f2b76156e9ac54e1a0d2ed.tar.bz2 |
- Patch #335893 by andypost, hexmode: don't show comment information in the RSS feed when a node's comments were disabled.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index ac2a38034..ae67b5d94 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -420,11 +420,13 @@ function comment_node_view($node, $teaser) { if ($node->comment) { if ($node->build_mode == NODE_BUILD_RSS) { - // Add a comments RSS element which is a URL to the comments of this node. - $node->rss_elements[] = array( - 'key' => 'comments', - 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE)) - ); + if ($node->comment != COMMENT_NODE_HIDDEN) { + // Add a comments RSS element which is a URL to the comments of this node. + $node->rss_elements[] = array( + 'key' => 'comments', + 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE)) + ); + } } else if ($teaser) { // Main page: display the number of comments that have been posted. |