Merge "Capitalise Message in SpecialAllMessages files"
[lhc/web/wiklou.git] / maintenance / updateSpecialPages.php
index c5ade2d..fae9063 100644 (file)
@@ -40,16 +40,13 @@ class UpdateSpecialPages extends Maintenance {
        }
 
        public function execute() {
-               global $IP, $wgQueryPages, $wgQueryCacheLimit, $wgDisableQueryPageUpdate;
+               global $wgQueryCacheLimit, $wgDisableQueryPageUpdate;
 
                $dbw = wfGetDB( DB_MASTER );
 
                $this->doSpecialPageCacheUpdates( $dbw );
 
-               // This is needed to initialise $wgQueryPages
-               require_once "$IP/includes/QueryPage.php";
-
-               foreach ( $wgQueryPages as $page ) {
+               foreach ( QueryPage::getPages() as $page ) {
                        list( $class, $special ) = $page;
                        $limit = isset( $page[2] ) ? $page[2] : null;
 
@@ -60,8 +57,8 @@ class UpdateSpecialPages extends Maintenance {
                        }
 
                        if ( !$this->hasOption( 'override' )
-                               && $wgDisableQueryPageUpdate && in_array( $special, $wgDisableQueryPageUpdate ) )
-                       {
+                               && $wgDisableQueryPageUpdate && in_array( $special, $wgDisableQueryPageUpdate )
+                       {
                                $this->output( sprintf( "%-30s [QueryPage] disabled\n", $special ) );
                                continue;
                        }