r78810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78809‎ | r78810 | r78811 >
Date:17:44, 22 December 2010
Author:catrope
Status:deferred
Tags:
Comment:
Fix ApprovedRevs to be dual-compatible with the QueryPage rewrite in 1.18 and with pre-1.18 versions. This is a bit awkward but seems to work
Modified paths:
  • /trunk/extensions/ApprovedRevs/SpecialApprovedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ApprovedRevs/SpecialApprovedRevs.php
@@ -26,7 +26,11 @@
2727 list( $limit, $offset ) = wfCheckLimits();
2828 $mode = $wgRequest->getVal( 'show' );
2929 $rep = new SpecialApprovedRevsPage( $mode );
30 - return $rep->doQuery( $offset, $limit );
 30+ if ( method_exists( $rep, 'execute' ) ) {
 31+ return $rep->execute( $query );
 32+ } else {
 33+ return $rep->doQuery( $offset, $limit );
 34+ }
3135 }
3236 }
3337
@@ -34,6 +38,7 @@
3539 private $mMode;
3640
3741 public function __construct( $mode ) {
 42+ parent::__construct( 'ApprovedRevs' );
3843 $this->mMode = $mode;
3944 }
4045

Follow-up revisions

RevisionCommit summaryAuthorDate
r78815Followup r78810, change constructor call to something I think won't break. St...catrope18:17, 22 December 2010

Status & tagging log