X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateSpecialPages.php;h=61642828c9ecb43a66e9b7ca71bbc662aa9efaeb;hb=222727927abfe04a3116e4f7671e7628b14fe661;hp=c5ade2d807a6ce67c2e09326ed3d928b82bc3efe;hpb=be7ee7d714b63f8bf5c07944b7eab9f6af2d9a1d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index c5ade2d807..61642828c9 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -34,22 +34,19 @@ class UpdateSpecialPages extends Maintenance { parent::__construct(); $this->addOption( 'list', 'List special page names' ); $this->addOption( 'only', 'Only update "page"; case sensitive, ' . - 'check correct case by calling this script with --list or on ' . - 'includes/QueryPage.php. Ex: --only=BrokenRedirects', false, true ); + 'check correct case by calling this script with --list. ' . + 'Ex: --only=BrokenRedirects', false, true ); $this->addOption( 'override', 'Also update pages that have updates disabled' ); } 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; }