Index: branches/liquidthreads/extensions/LqtExtension.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | return $this->request->getVal('lqt_method') == $method; |
157 | 157 | } |
158 | 158 | |
159 | | - function permalinkUrl( $thread, $method = null, $operand = null ) { |
| 159 | + static function permalinkUrl( $thread, $method = null, $operand = null ) { |
160 | 160 | $query = $method ? "lqt_method=$method" : ""; |
161 | 161 | $query = $operand ? "$query&lqt_operand={$operand->id()}" : $query; |
162 | 162 | return $thread->root()->getTitle()->getFullUrl($query); |
— | — | @@ -163,12 +163,12 @@ |
164 | 164 | |
165 | 165 | /* This is used for action=history so that the history tab works, which is |
166 | 166 | why we break the lqt_method paradigm. */ |
167 | | - function permalinkUrlWithQuery( $thread, $query ) { |
| 167 | + static function permalinkUrlWithQuery( $thread, $query ) { |
168 | 168 | if ( is_array($query) ) $query = self::queryStringFromArray($query); |
169 | 169 | return $thread->root()->getTitle()->getFullUrl($query); |
170 | 170 | } |
171 | 171 | |
172 | | - function talkpageUrl( $title, $method = null, $operand = null ) { |
| 172 | + static function talkpageUrl( $title, $method = null, $operand = null ) { |
173 | 173 | $query = $method ? "lqt_method=$method" : ""; |
174 | 174 | $query = $operand ? "$query&lqt_operand={$operand->id()}" : $query; |
175 | 175 | return $title->getFullURL( $query ); |
— | — | @@ -909,9 +909,14 @@ |
910 | 910 | * @return string HTML output for the row |
911 | 911 | */ |
912 | 912 | 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>'; |
914 | 917 | } |
915 | | - |
| 918 | + function getNotificationTimestamp() { |
| 919 | + return "foo"; |
| 920 | + } |
916 | 921 | /* |
917 | 922 | function formatRow( $row ) { |
918 | 923 | return '<li>' . $row->hthread_revision; |
— | — | @@ -920,11 +925,11 @@ |
921 | 926 | function getStartBody() { |
922 | 927 | $this->mLastRow = false; |
923 | 928 | $this->mCounter = 1; |
924 | | - return 'start'; |
| 929 | + return '<table>'; |
925 | 930 | } |
926 | 931 | |
927 | 932 | function getEndBody() { |
928 | | - return ""; |
| 933 | + return "</table>"; |
929 | 934 | } |
930 | 935 | } |
931 | 936 | |
— | — | @@ -951,7 +956,7 @@ |
952 | 957 | // but we still want to know about $t->article. |
953 | 958 | $this->article = $t->article(); # for creating reply threads. |
954 | 959 | |
955 | | - $this->output->setSubtitle("viewing a historical thread..."); |
| 960 | + $this->output->setSubtitle("Viewing a history listing."); |
956 | 961 | |
957 | 962 | $this->showThreadHeading($t); |
958 | 963 | $this->showHistoryListing($t); |