summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-12-12 09:20:17 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-12-12 09:20:17 +0000
commita10ca909a0f0f6dbead4401c006b81fee24b68e4 (patch)
treef7a5fc5c99b828a8d6027a2e75b4aa572428cf04
parenta0ca5362c09584445685d46b84a53021c62f6e30 (diff)
downloadbrdo-a10ca909a0f0f6dbead4401c006b81fee24b68e4.tar.gz
brdo-a10ca909a0f0f6dbead4401c006b81fee24b68e4.tar.bz2
#93897: Fix comment de-indenting multiple levels at a time.
-rw-r--r--modules/comment/comment.module11
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);