From a10ca909a0f0f6dbead4401c006b81fee24b68e4 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 12 Dec 2006 09:20:17 +0000 Subject: #93897: Fix comment de-indenting multiple levels at a time. --- modules/comment/comment.module | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index f23ddf280..1321edcdd 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -978,12 +978,15 @@ function comment_render($node, $cid = 0) { if ($comment->depth > $last_depth) { $divs++; $output .= '
'; + $last_depth++; } - else if ($comment->depth < $last_depth) { - $divs--; - $output .= '
'; + else { + while ($comment->depth < $last_depth) { + $divs--; + $output .= ''; + $last_depth--; + } } - $last_depth = $comment->depth; if ($mode == COMMENT_MODE_FLAT_COLLAPSED) { $output .= theme('comment_flat_collapsed', $comment); -- cgit v1.2.3