summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/comment.module22
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 1321edcdd..adaccfe0b 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -975,16 +975,18 @@ function comment_render($node, $cid = 0) {
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
$comment->depth = count(explode('.', $comment->thread)) - 1;
- if ($comment->depth > $last_depth) {
- $divs++;
- $output .= '<div class="indented">';
- $last_depth++;
- }
- else {
- while ($comment->depth < $last_depth) {
- $divs--;
- $output .= '</div>';
- $last_depth--;
+ if ($mode == COMMENT_MODE_THREADED_COLLAPSED || $mode == COMMENT_MODE_THREADED_EXPANDED) {
+ if ($comment->depth > $last_depth) {
+ $divs++;
+ $output .= '<div class="indented">';
+ $last_depth++;
+ }
+ else {
+ while ($comment->depth < $last_depth) {
+ $divs--;
+ $output .= '</div>';
+ $last_depth--;
+ }
}
}