Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php |
— | — | @@ -31,10 +31,15 @@ |
32 | 32 | |
33 | 33 | $rep = new TypesPage(); |
34 | 34 | |
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 | + } |
36 | 43 | |
37 | | - $rep->doQuery( $offset, $limit ); |
38 | | - |
39 | 44 | // Ensure locally collected output data is pushed to the output! |
40 | 45 | SMWOutputs::commitToOutputPage( $wgOut ); |
41 | 46 | |
— | — | @@ -46,7 +51,10 @@ |
47 | 52 | class TypesPage extends QueryPage { |
48 | 53 | |
49 | 54 | public function __construct( $name = 'Types' ) { |
50 | | - parent::__construct( $name ); |
| 55 | + global $wgVersion; |
| 56 | + if ( version_compare( $wgVersion, '1.17', '>=' ) ) { |
| 57 | + parent::__construct( $name ); |
| 58 | + } |
51 | 59 | } |
52 | 60 | |
53 | 61 | function getName() { |