From 46392b264c67611388a7d188e4fc29b848f9b388 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 15 Dec 2006 01:33:00 +0000 Subject: #92242: Don't indent when comment view is flat. --- modules/comment/comment.module | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'modules/comment/comment.module') 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 .= '
'; - $last_depth++; - } - else { - while ($comment->depth < $last_depth) { - $divs--; - $output .= '
'; - $last_depth--; + if ($mode == COMMENT_MODE_THREADED_COLLAPSED || $mode == COMMENT_MODE_THREADED_EXPANDED) { + if ($comment->depth > $last_depth) { + $divs++; + $output .= '
'; + $last_depth++; + } + else { + while ($comment->depth < $last_depth) { + $divs--; + $output .= '
'; + $last_depth--; + } } } -- cgit v1.2.3