r25764 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25763‎ | r25764 | r25765 >
Date:06:27, 11 September 2007
Author:david
Status:old
Tags:
Comment:
User signatures are very expensive, and of questionable value. In fact, somebody on the test site already changed their sig to not be a link at all.
Modified paths:
  • /branches/liquidthreads/extensions/LqtBaseView.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtBaseView.php
@@ -507,23 +507,21 @@
508508 function showThreadFooter( $thread ) {
509509 global $wgLang; // TODO global.
510510
511 - $thread_author = $thread->root()->originalAuthor();
512 - $color_number = $this->selectNewUserColor($thread_author);
513 - $p = new Parser(); $sig = $p->getUserSig($thread_author);
 511+ $author = $thread->root()->originalAuthor();
 512+ $color_number = $this->selectNewUserColor($author);
 513+
 514+ $sig = $this->user->getSkin()->userLink( $author->getID(), $author->getName() ) .
 515+ $this->user->getSkin()->userToolLinks( $author->getID(), $author->getName() );
 516+
514517 $timestamp = $wgLang->timeanddate($thread->timestamp());
515518
516519 $this->output->addHTML(<<<HTML
517520 <ul class="lqt_footer">
518 -<li class="lqt_author_sig lqt_post_color_{$color_number}">
519 -HTML
520 -);
521 - $this->output->addWikitext($sig, false); #gah!
522 - $this->output->addHTML(<<<HTML
523 -</li>
 521+<li class="lqt_author_sig lqt_post_color_{$color_number}">$sig</li>
524522 <li>$timestamp</li>
525523 HTML
526 -);
527 -
 524+ );
 525+
528526 foreach( $this->applicableThreadCommands($thread) as $command ) {
529527 $label = $command['label'];
530528 $href = $command['href'];
@@ -535,6 +533,7 @@
536534 $this->output->addHTML( "<li><span class=\"lqt_footer_disabled\">$label</span></li>" );
537535 }
538536 }
 537+
539538 $this->output->addHTML('</ul>');
540539 }
541540

Status & tagging log