r82671 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82670‎ | r82671 | r82672 >
Date:14:35, 23 February 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix page again after r82642 and r82641
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php
@@ -31,10 +31,15 @@
3232
3333 $rep = new TypesPage();
3434
35 - list( $limit, $offset ) = wfCheckLimits();
 35+ // execute() method added in MW 1.18
 36+ if ( method_exists( $rep, 'execute' ) ) {
 37+ $rep->execute( $param );
 38+ }
 39+ else {
 40+ list( $limit, $offset ) = wfCheckLimits();
 41+ $rep->doQuery( $offset, $limit );
 42+ }
3643
37 - $rep->doQuery( $offset, $limit );
38 -
3944 // Ensure locally collected output data is pushed to the output!
4045 SMWOutputs::commitToOutputPage( $wgOut );
4146
@@ -46,7 +51,10 @@
4752 class TypesPage extends QueryPage {
4853
4954 public function __construct( $name = 'Types' ) {
50 - parent::__construct( $name );
 55+ global $wgVersion;
 56+ if ( version_compare( $wgVersion, '1.17', '>=' ) ) {
 57+ parent::__construct( $name );
 58+ }
5159 }
5260
5361 function getName() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82641Followup r78786, per complaints on r82636, revert parameter ordering...reedy23:22, 22 February 2011
r82642Partial revert r82636 after fixing swapped parameters in r82641reedy23:26, 22 February 2011

Status & tagging log