Index: trunk/extensions/SemanticForms/specials/SF_Templates.php |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | $this->setHeaders(); |
23 | 23 | list( $limit, $offset ) = wfCheckLimits(); |
24 | 24 | $rep = new TemplatesPage(); |
| 25 | + // execute() method added in MW 1.18 |
25 | 26 | if ( method_exists( $rep, 'execute' ) ) { |
26 | 27 | $rep->execute( $query ); |
27 | 28 | } else { |
— | — | @@ -31,7 +32,10 @@ |
32 | 33 | |
33 | 34 | class TemplatesPage extends QueryPage { |
34 | 35 | public function __construct( $name = 'Templates' ) { |
35 | | - parent::__construct( $name ); |
| 36 | + // For MW <= 1.17 |
| 37 | + if ( $this instanceof SpecialPage ) { |
| 38 | + parent::__construct( $name ); |
| 39 | + } |
36 | 40 | } |
37 | 41 | |
38 | 42 | function getName() { |
— | — | @@ -71,6 +75,7 @@ |
72 | 76 | WHERE page_namespace = {$NStemp}"; |
73 | 77 | } |
74 | 78 | |
| 79 | + // For MW 1.18+ |
75 | 80 | function getQueryInfo() { |
76 | 81 | return array( |
77 | 82 | 'tables' => array( 'page' ), |