summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index ad21c374c..9f018dba8 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -577,7 +577,8 @@ function comment_node_view($node, $build_mode) {
// page. We compare $node and $page_node to ensure that comments are not
// appended to other nodes shown on the page, for example a node_reference
// displayed in 'full' build mode within another node.
- if ($node->comment && node_is_page($node) && empty($node->in_preview) && user_access('access comments')) {
+ $page_node = menu_get_object();
+ if ($node->comment && isset($page_node->nid) && $page_node->nid == $node->nid && empty($node->in_preview) && user_access('access comments')) {
$node->content['comments'] = comment_node_page_additions($node);
}
}