Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php |
— | — | @@ -32,8 +32,18 @@ |
33 | 33 | $rep = new TypesPage(); |
34 | 34 | |
35 | 35 | list( $limit, $offset ) = wfCheckLimits(); |
36 | | - $rep->doQuery( $offset, $limit ); |
37 | 36 | |
| 37 | + // When the QueryPage class was changed in r78786, the order of these |
| 38 | + // parameters was conveniently swapped around. Brilliant for introducing |
| 39 | + // subtle bugs; we ought to do it more! |
| 40 | + if ( method_exists( 'QueryPage', 'getQueryInfo' ) ) { |
| 41 | + $rep->doQuery( $limit, $offset ); |
| 42 | + $rep->execute( array() ); |
| 43 | + } |
| 44 | + else { |
| 45 | + $rep->doQuery( $offset, $limit ); |
| 46 | + } |
| 47 | + |
38 | 48 | // Ensure locally collected output data is pushed to the output! |
39 | 49 | SMWOutputs::commitToOutputPage( $wgOut ); |
40 | 50 | |
— | — | @@ -44,8 +54,12 @@ |
45 | 55 | |
46 | 56 | class TypesPage extends QueryPage { |
47 | 57 | |
| 58 | + public function __construct( $name = 'Types' ) { |
| 59 | + parent::__construct( $name ); |
| 60 | + } |
| 61 | + |
48 | 62 | function getName() { |
49 | | - return "Types"; |
| 63 | + return 'Types'; |
50 | 64 | } |
51 | 65 | |
52 | 66 | function isExpensive() { |
— | — | @@ -57,7 +71,7 @@ |
58 | 72 | } |
59 | 73 | |
60 | 74 | function getPageHeader() { |
61 | | - return '<p>' . wfMsg( 'smw_types_docu' ) . "</p><br />\n"; |
| 75 | + return '<p>' . htmlspecialchars( wfMsg( 'smw_types_docu' ) ) . "</p><br />\n"; |
62 | 76 | } |
63 | 77 | |
64 | 78 | /* Failed attempt to fix https://bugzilla.wikimedia.org/show_bug.cgi?id=27440 |