r25107 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25106‎ | r25107 | r25108 >
Date:07:20, 24 August 2007
Author:david
Status:old
Tags:
Comment:
can now look up latest revision as if it was a historical revision.
Modified paths:
  • /branches/liquidthreads/extensions/LqtExtension.php (modified) (history)
  • /branches/liquidthreads/extensions/LqtModel.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtExtension.php
@@ -1118,12 +1118,12 @@
11191119 /* unset($content_actions['history']);
11201120 unset($content_actions['watch']);
11211121 unset($content_actions['move']);*/
1122 - if( array_key_exists( 'move', $content_actions ) ) {
 1122+ if( array_key_exists( 'move', $content_actions ) && $this->thread ) {
11231123 $content_actions['move']['href'] =
11241124 SpecialPage::getPage('Movethread')->getTitle()->getFullURL() . '/' .
11251125 $this->thread->title()->getPrefixedURL();
11261126 }
1127 - if( array_key_exists( 'delete', $content_actions ) ) {
 1127+ if( array_key_exists( 'delete', $content_actions ) && $this->thread ) {
11281128 $content_actions['delete']['href'] =
11291129 SpecialPage::getPage('Deletethread')->getTitle()->getFullURL() . '/' .
11301130 $this->thread->title()->getPrefixedURL();
Index: branches/liquidthreads/extensions/LqtModel.php
@@ -208,7 +208,10 @@
209209 }
210210
211211 function atRevision($r) {
212 - return HistoricalThread::withIdAtRevision($this->id(), $r);
 212+ if ( $r == $this->revisionNumber() )
 213+ return $this;
 214+ else
 215+ return HistoricalThread::withIdAtRevision($this->id(), $r);
213216 }
214217
215218 function historicalRevisions() {

Status & tagging log