r26231 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26230‎ | r26231 | r26232 >
Date:23:32, 28 September 2007
Author:david
Status:old
Tags:
Comment:
Maximum indentation level (set to 4 for now).
Modified paths:
  • /branches/liquidthreads/extensions/LqtBaseView.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtBaseView.php
@@ -126,6 +126,8 @@
127127 protected $request;
128128
129129 protected $headerLevel = 2; /* h1, h2, h3, etc. */
 130+ protected $maxIndentationLevel = 4;
 131+
130132 protected $user_colors;
131133 protected $user_color_index;
132134 const number_of_user_colors = 6;
@@ -643,13 +645,19 @@
644646 }
645647
646648 function indent() {
647 - $this->output->addHTML( wfOpenElement( 'dl', array('class'=>'lqt_replies') ) );
648 - $this->output->addHTML( wfOpenElement( 'dd') );
 649+ if( $this->headerLevel <= $this->maxIndentationLevel ) {
 650+ $this->output->addHTML('<dl class="lqt_replies"><dd>');
 651+ } else {
 652+ $this->output->addHTML('<div class="lqt_replies_without_indent">');
 653+ }
649654 $this->headerLevel += 1;
650655 }
651656 function unindent() {
652 - $this->output->addHTML( wfCloseElement( 'dd') );
653 - $this->output->addHTML( wfCloseElement( 'dl') );
 657+ if( $this->headerLevel <= $this->maxIndentationLevel + 1 ) {
 658+ $this->output->addHTML('</dd></dl>');
 659+ } else {
 660+ $this->output->addHTML('</div>');
 661+ }
654662 $this->headerLevel -= 1;
655663 }
656664

Status & tagging log