Index: trunk/extensions/PasswordReset/PasswordReset_Disabledusers.php |
— | — | @@ -11,33 +11,11 @@ |
12 | 12 | * @ingroup Extensions |
13 | 13 | * @author Tim Laqua <t.laqua@gmail.com> |
14 | 14 | */ |
15 | | - |
16 | | -class Disabledusers extends SpecialPage { |
17 | | - ///StalePages Class Constructor |
18 | | - public function __construct() { |
19 | | - wfLoadExtensionMessages('PasswordReset'); |
20 | | - parent::__construct( 'Disabledusers', 'passwordreset' ); |
| 15 | +class Disabledusers extends QueryPage { |
| 16 | + public function __construct( $name = 'Disabledusers' ) { |
| 17 | + parent::__construct( $name, 'passwordreset' ); |
21 | 18 | } |
22 | 19 | |
23 | | - function getDescription() { |
24 | | - return wfMsg( 'disabledusers' ); |
25 | | - } |
26 | | - |
27 | | - function execute( $parameters ) { |
28 | | - $this->setHeaders(); |
29 | | - list( $limit, $offset ) = wfCheckLimits(); |
30 | | - |
31 | | - $sp = new DisabledusersPage(); |
32 | | - |
33 | | - $sp->doQuery( $offset, $limit ); |
34 | | - } |
35 | | -} |
36 | | - |
37 | | -class DisabledusersPage extends QueryPage { |
38 | | - function getName() { |
39 | | - return "Disabledusers"; |
40 | | - } |
41 | | - |
42 | 20 | function isExpensive() { |
43 | 21 | return true; |
44 | 22 | } |
Index: trunk/extensions/SemanticForms/specials/SF_Forms.php |
— | — | @@ -7,15 +7,39 @@ |
8 | 8 | |
9 | 9 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
10 | 10 | |
11 | | -class SFForms extends QueryPage { |
| 11 | +class SFForms extends SpecialPage { |
| 12 | + |
12 | 13 | /** |
13 | 14 | * Constructor |
14 | 15 | */ |
15 | | - function __construct( $name = 'Forms' ) { |
16 | | - parent::__construct( $name ); |
| 16 | + function __construct() { |
| 17 | + parent::__construct( 'Forms' ); |
17 | 18 | SFUtils::loadMessages(); |
18 | 19 | } |
19 | 20 | |
| 21 | + function execute( $query ) { |
| 22 | + $this->setHeaders(); |
| 23 | + list( $limit, $offset ) = wfCheckLimits(); |
| 24 | + $rep = new FormsPage(); |
| 25 | + if ( method_exists( $rep, 'execute' ) ) { |
| 26 | + return $rep->execute( $query ); |
| 27 | + } else { |
| 28 | + return $rep->doQuery( $offset, $limit ); |
| 29 | + } |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +class FormsPage extends QueryPage { |
| 34 | + public function __construct( $name = 'Forms' ) { |
| 35 | + if ( $this instanceof SpecialPage ) { |
| 36 | + parent::__construct( $name ); |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + function getName() { |
| 41 | + return "Forms"; |
| 42 | + } |
| 43 | + |
20 | 44 | function isExpensive() { return false; } |
21 | 45 | |
22 | 46 | function isSyndicated() { return false; } |
— | — | @@ -49,7 +73,7 @@ |
50 | 74 | WHERE page_namespace = {$NSform} |
51 | 75 | AND page_is_redirect = 0"; |
52 | 76 | } |
53 | | - |
| 77 | + |
54 | 78 | function getQueryInfo() { |
55 | 79 | return array( |
56 | 80 | 'tables' => array( 'page' ), |
Index: trunk/extensions/SemanticForms/specials/SF_Templates.php |
— | — | @@ -21,11 +21,19 @@ |
22 | 22 | $this->setHeaders(); |
23 | 23 | list( $limit, $offset ) = wfCheckLimits(); |
24 | 24 | $rep = new TemplatesPage(); |
25 | | - return $rep->doQuery( $offset, $limit ); |
| 25 | + if ( method_exists( $rep, 'execute' ) ) { |
| 26 | + $rep->execute( $query ); |
| 27 | + } else { |
| 28 | + return $rep->doQuery( $offset, $limit ); |
| 29 | + } |
26 | 30 | } |
27 | 31 | } |
28 | 32 | |
29 | 33 | class TemplatesPage extends QueryPage { |
| 34 | + public function __construct( $name = 'Templates' ) { |
| 35 | + parent::__construct( $name ); |
| 36 | + } |
| 37 | + |
30 | 38 | function getName() { |
31 | 39 | return "Templates"; |
32 | 40 | } |
Index: trunk/extensions/StalePages/StalePages_body.php |
— | — | @@ -11,36 +11,12 @@ |
12 | 12 | * @ingroup Extensions |
13 | 13 | * @author Tim Laqua <t.laqua@gmail.com> |
14 | 14 | */ |
15 | | - |
16 | | -class Stalepages extends SpecialPage |
| 15 | +class Stalepages extends QueryPage |
17 | 16 | { |
18 | | - ///StalePages Class Constructor |
19 | | - public function __construct() { |
20 | | - parent::__construct( 'StalePages' ); |
| 17 | + public function __construct( $name = 'Stalepages' ) { |
| 18 | + parent::__construct( $name ); |
21 | 19 | } |
22 | 20 | |
23 | | - function getDescription() { |
24 | | - return wfMsg( 'stalepages' ); |
25 | | - } |
26 | | - |
27 | | - function execute( $parameters ) { |
28 | | - wfLoadExtensionMessages( 'Stalepages' ); |
29 | | - |
30 | | - $this->setHeaders(); |
31 | | - list( $limit, $offset ) = wfCheckLimits(); |
32 | | - |
33 | | - $sp = new StalepagesPage(); |
34 | | - |
35 | | - $sp->doQuery( $offset, $limit ); |
36 | | - } |
37 | | -} |
38 | | - |
39 | | -class StalepagesPage extends QueryPage |
40 | | -{ |
41 | | - function getName() { |
42 | | - return "Stalepages"; |
43 | | - } |
44 | | - |
45 | 21 | function isExpensive() { |
46 | 22 | return true; |
47 | 23 | } |
Index: trunk/extensions/SemanticDrilldown/specials/SD_Filters.php |
— | — | @@ -21,17 +21,25 @@ |
22 | 22 | $this->setHeaders(); |
23 | 23 | list( $limit, $offset ) = wfCheckLimits(); |
24 | 24 | $rep = new FiltersPage(); |
25 | | - return $rep->doQuery( $offset, $limit ); |
| 25 | + if ( method_exists( $rep, 'execute' ) ) { |
| 26 | + return $rep->execute( $par ); |
| 27 | + } else { |
| 28 | + return $rep->doQuery( $offset, $limit ); |
| 29 | + } |
26 | 30 | } |
27 | 31 | } |
28 | 32 | |
29 | 33 | class FiltersPage extends QueryPage { |
| 34 | + function __construct( $name = 'Filters' ) { |
| 35 | + if ( $this instanceof SpecialPage ) { |
| 36 | + parent::__construct( $name ); |
| 37 | + } |
| 38 | + } |
| 39 | + |
30 | 40 | function getName() { |
31 | 41 | return "Filters"; |
32 | 42 | } |
33 | 43 | |
34 | | - function isExpensive() { return false; } |
35 | | - |
36 | 44 | function isSyndicated() { return false; } |
37 | 45 | |
38 | 46 | function getPageHeader() { |
Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -142,7 +142,11 @@ |
143 | 143 | |
144 | 144 | $wgOut->addHTML( "\n <div class=\"drilldown-results\">\n" ); |
145 | 145 | $rep = new SDBrowseDataPage( $category, $subcategory, $applied_filters, $remaining_filters ); |
146 | | - $num = $rep->doQuery( $offset, $limit ); |
| 146 | + if ( method_exists( $rep, 'execute' ) ) { |
| 147 | + $num = $rep->execute( $query ); |
| 148 | + } else { |
| 149 | + $num = $rep->doQuery( $offset, $limit ); |
| 150 | + } |
147 | 151 | $wgOut->addHTML( "\n </div> <!-- drilldown-results -->\n" ); |
148 | 152 | return $num; |
149 | 153 | } |
— | — | @@ -161,6 +165,9 @@ |
162 | 166 | * Initialize the variables of this page |
163 | 167 | */ |
164 | 168 | function __construct( $category, $subcategory, $applied_filters, $remaining_filters ) { |
| 169 | + if ( $this instanceof SpecialPage ) { |
| 170 | + parent::__construct( 'BrowseData' ); |
| 171 | + } |
165 | 172 | $this->category = $category; |
166 | 173 | $this->subcategory = $subcategory; |
167 | 174 | $this->applied_filters = $applied_filters; |