Add ability to override mb_strtoupper in Language::ucfirst
[lhc/web/wiklou.git] / maintenance / updateSpecialPages.php
index 01aace0..5d756e8 100644 (file)
@@ -25,7 +25,6 @@
 require_once __DIR__ . '/Maintenance.php';
 
 use MediaWiki\MediaWikiServices;
-use Wikimedia\Rdbms\DBReplicationWaitError;
 
 /**
  * Maintenance script to update cached special pages.
@@ -50,7 +49,7 @@ class UpdateSpecialPages extends Maintenance {
                $this->doSpecialPageCacheUpdates( $dbw );
 
                foreach ( QueryPage::getPages() as $page ) {
-                       list( $class, $special ) = $page;
+                       list( , $special ) = $page;
                        $limit = $page[2] ?? null;
 
                        # --list : just show the name of pages
@@ -66,7 +65,8 @@ class UpdateSpecialPages extends Maintenance {
                                continue;
                        }
 
-                       $specialObj = SpecialPageFactory::getPage( $special );
+                       $specialObj = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+                               getPage( $special );
                        if ( !$specialObj ) {
                                $this->output( "No such special page: $special\n" );
                                exit;
@@ -133,11 +133,7 @@ class UpdateSpecialPages extends Maintenance {
                        $this->output( "Reconnected\n\n" );
                }
                // Wait for the replica DB to catch up
-               try {
-                       $lbFactory->waitForReplication();
-               } catch ( DBReplicationWaitError $e ) {
-                       // ignore
-               }
+               $lbFactory->waitForReplication();
        }
 
        public function doSpecialPageCacheUpdates( $dbw ) {