summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-12-15 01:33:00 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-12-15 01:33:00 +0000
commit46392b264c67611388a7d188e4fc29b848f9b388 (patch)
tree1f499a2700bdc0e646a9a11bd8f64b524c870edb /modules/comment/comment.module
parent57c5355a4b951731bf93b0f335042a291ee673b6 (diff)
downloadbrdo-46392b264c67611388a7d188e4fc29b848f9b388.tar.gz
brdo-46392b264c67611388a7d188e4fc29b848f9b388.tar.bz2
#92242: Don't indent when comment view is flat.
Diffstat (limited to 'modules/comment/comment.module')
-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--;
+ }
}
}