r22812 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22811‎ | r22812 | r22813 >
Date:07:37, 7 June 2007
Author:david
Status:old
Tags:
Comment:
make TalkpageArchiveView a subclass of TalkpageView to get tabs, JS customization.
Modified paths:
  • /branches/liquidthreads/extensions/LqtExtension.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtExtension.php
@@ -632,7 +632,7 @@
633633 }
634634 }
635635
636 -class TalkpageArchiveView extends LqtView {
 636+class TalkpageArchiveView extends TalkpageView {
637637 function __construct(&$output, &$article, &$title, &$user, &$request) {
638638 parent::__construct($output, $article, $title, $user, $request);
639639 $this->loadQueryFromRequest();
@@ -689,9 +689,11 @@
690690 $this->options = $options;
691691 $this->annotations = implode("<br>\n", $annotations);
692692 }
 693+
693694 function threads() {
694695 return Thread::threadsWhere($this->where, $this->options);
695696 }
 697+
696698 function formattedMonth($yyyymm) {
697699 global $wgLang; // TODO global.
698700 return $wgLang->getMonthName( substr($yyyymm, 4, 2) ).' '.substr($yyyymm, 0, 4);
@@ -745,7 +747,12 @@
746748 }
747749
748750 function show() {
 751+ global $wgHooks;
 752+ $wgHooks['SkinTemplateTabs'][] = array($this, 'customizeTabs');
 753+
749754 $this->output->setPageTitle( "Talk:" . $this->title->getText() ); // TODO non-main namespaces.
 755+ $this->addJSandCSS();
 756+
750757 $this->showSearchForm();
751758 $this->output->addHTML("<p>" . $this->annotations . ".</p>");
752759 $this->output->addHTML('<table border="1">');
@@ -800,4 +807,3 @@
801808 }
802809
803810 }
804 -

Status & tagging log