r24094 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24093‎ | r24094 | r24095 >
Date:22:02, 14 July 2007
Author:david
Status:old
Tags:
Comment:
Barely enumerate and link to revisions -- we're getting somewhere!
Modified paths:
  • /branches/liquidthreads/extensions/LqtExtension.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtExtension.php
@@ -155,7 +155,7 @@
156156 return $this->request->getVal('lqt_method') == $method;
157157 }
158158
159 - function permalinkUrl( $thread, $method = null, $operand = null ) {
 159+ static function permalinkUrl( $thread, $method = null, $operand = null ) {
160160 $query = $method ? "lqt_method=$method" : "";
161161 $query = $operand ? "$query&lqt_operand={$operand->id()}" : $query;
162162 return $thread->root()->getTitle()->getFullUrl($query);
@@ -163,12 +163,12 @@
164164
165165 /* This is used for action=history so that the history tab works, which is
166166 why we break the lqt_method paradigm. */
167 - function permalinkUrlWithQuery( $thread, $query ) {
 167+ static function permalinkUrlWithQuery( $thread, $query ) {
168168 if ( is_array($query) ) $query = self::queryStringFromArray($query);
169169 return $thread->root()->getTitle()->getFullUrl($query);
170170 }
171171
172 - function talkpageUrl( $title, $method = null, $operand = null ) {
 172+ static function talkpageUrl( $title, $method = null, $operand = null ) {
173173 $query = $method ? "lqt_method=$method" : "";
174174 $query = $operand ? "$query&lqt_operand={$operand->id()}" : $query;
175175 return $title->getFullURL( $query );
@@ -909,9 +909,14 @@
910910 * @return string HTML output for the row
911911 */
912912 function historyLine( $row, $next, $counter = '', $notificationtimestamp = false, $latest = false, $firstInList = false ) {
913 -
 913+ /* TODO: best not to refer to LqtView class directly. */
 914+ /* We don't use oldid because that has side-effects. */
 915+ $url = LqtView::permalinkUrlWithQuery( $this->thread, 'lqt_oldid=' . $row->hthread_revision );
 916+ return "<tr><td><a href=\"$url\">" . $row->hthread_revision . '</a></td></tr>';
914917 }
915 -
 918+ function getNotificationTimestamp() {
 919+ return "foo";
 920+ }
916921 /*
917922 function formatRow( $row ) {
918923 return '<li>' . $row->hthread_revision;
@@ -920,11 +925,11 @@
921926 function getStartBody() {
922927 $this->mLastRow = false;
923928 $this->mCounter = 1;
924 - return 'start';
 929+ return '<table>';
925930 }
926931
927932 function getEndBody() {
928 - return "";
 933+ return "</table>";
929934 }
930935 }
931936
@@ -951,7 +956,7 @@
952957 // but we still want to know about $t->article.
953958 $this->article = $t->article(); # for creating reply threads.
954959
955 - $this->output->setSubtitle("viewing a historical thread...");
 960+ $this->output->setSubtitle("Viewing a history listing.");
956961
957962 $this->showThreadHeading($t);
958963 $this->showHistoryListing($t);

Status & tagging log