diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-12 09:20:17 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-12 09:20:17 +0000 |
commit | a10ca909a0f0f6dbead4401c006b81fee24b68e4 (patch) | |
tree | f7a5fc5c99b828a8d6027a2e75b4aa572428cf04 | |
parent | a0ca5362c09584445685d46b84a53021c62f6e30 (diff) | |
download | brdo-a10ca909a0f0f6dbead4401c006b81fee24b68e4.tar.gz brdo-a10ca909a0f0f6dbead4401c006b81fee24b68e4.tar.bz2 |
#93897: Fix comment de-indenting multiple levels at a time.
-rw-r--r-- | modules/comment/comment.module | 11 |
1 files changed, 7 insertions, 4 deletions
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 .= '<div class="indented">'; + $last_depth++; } - else if ($comment->depth < $last_depth) { - $divs--; - $output .= '</div>'; + else { + while ($comment->depth < $last_depth) { + $divs--; + $output .= '</div>'; + $last_depth--; + } } - $last_depth = $comment->depth; if ($mode == COMMENT_MODE_FLAT_COLLAPSED) { $output .= theme('comment_flat_collapsed', $comment); |