function show() { if (!$this->thread) { $this->showMissingThreadPage(); return false; } $this->thread->updateHistory(); $this->output->setPageTitle(wfMessage('lqt-history-title')); $this->output->setSubtitle($this->getSubtitle() . '<br />' . wfMessage('lqt_hist_listing_subtitle')->escaped()); $this->showThreadHeading($this->thread); $pager = new ThreadHistoryPager($this, $this->thread); $html = $pager->getNavigationBar() . $pager->getBody() . $pager->getNavigationBar(); $this->output->addHTML($html); $this->showThread($this->thread); return false; }
function __construct($view, $thread) { parent::__construct(); $this->thread = $thread; $this->view = $view; self::$change_names = array(Threads::CHANGE_EDITED_ROOT => wfMsgNoTrans('lqt_hist_comment_edited'), Threads::CHANGE_EDITED_SUMMARY => wfMsgNoTrans('lqt_hist_summary_changed'), Threads::CHANGE_REPLY_CREATED => wfMsgNoTrans('lqt_hist_reply_created'), Threads::CHANGE_NEW_THREAD => wfMsgNoTrans('lqt_hist_thread_created'), Threads::CHANGE_DELETED => wfMsgNoTrans('lqt_hist_deleted'), Threads::CHANGE_UNDELETED => wfMsgNoTrans('lqt_hist_undeleted'), Threads::CHANGE_MOVED_TALKPAGE => wfMsgNoTrans('lqt_hist_moved_talkpage'), Threads::CHANGE_EDITED_SUBJECT => wfMsgNoTrans('lqt_hist_edited_subject'), Threads::CHANGE_SPLIT => wfMsgNoTrans('lqt_hist_split'), Threads::CHANGE_MERGED_FROM => wfMsgNoTrans('lqt_hist_merged_from'), Threads::CHANGE_MERGED_TO => wfMsgNoTrans('lqt_hist_merged_to'), Threads::CHANGE_SPLIT_FROM => wfMsgNoTrans('lqt_hist_split_from'), Threads::CHANGE_ROOT_BLANKED => wfMsgNoTrans('lqt_hist_root_blanked'), Threads::CHANGE_ADJUSTED_SORTKEY => wfMsgNoTrans('lqt_hist_adjusted_sortkey')); }
function formatValue($name, $value) { global $wgLang, $wgContLang; static $linker = null; if (empty($linker)) { $linker = class_exists('DummyLinker') ? new DummyLinker() : new Linker(); } $row = $this->mCurrentRow; $ns = $row->page_namespace; $title = $row->page_title; if (is_null($ns)) { $ns = $row->thread_article_namespace; $title = $row->thread_article_title; } switch ($name) { case 'thread_subject': $title = Title::makeTitleSafe($ns, $title); $link = $linker->link($title, $value, array(), array(), array('known')); return Html::rawElement('div', array('dir' => $wgContLang->getDir()), $link); case 'th_timestamp': $formatted = $wgLang->timeanddate($value); $title = Title::makeTitleSafe($ns, $title); return $linker->link($title, $formatted, array(), array('lqt_oldid' => $row->th_id)); default: return parent::formatValue($name, $value); } }
function formatValue($name, $value) { global $wgLang, $wgContLang, $wgOut; $wgOut->setRobotPolicy('noindex, nofollow'); $row = $this->mCurrentRow; $ns = $row->page_namespace; $title = $row->page_title; if (is_null($ns)) { $ns = $row->thread_article_namespace; $title = $row->thread_article_title; } switch ($name) { case 'thread_subject': $title = Title::makeTitleSafe($ns, $title); $link = Linker::link($title, htmlspecialchars($value), array(), array(), array('known')); return Html::rawElement('div', array('dir' => $wgContLang->getDir()), $link); case 'th_timestamp': $formatted = $wgLang->timeanddate($value); $title = Title::makeTitleSafe($ns, $title); return Linker::link($title, $formatted, array(), array('lqt_oldid' => $row->th_id)); default: return parent::formatValue($name, $value); } }