X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateDoubleWidthSearch.php;h=cb2f125eca3cb619ef1505b063de1de1abe6fcc4;hb=f8b3f04ae6d78a13b5793a0c4e3bc7080b2c72af;hp=796cedd98d302e9afa3445bf526317978f4c8914;hpb=19a38526f390cfdc6a6061cc055fc7f13167bf03;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateDoubleWidthSearch.php b/maintenance/updateDoubleWidthSearch.php index 796cedd98d..cb2f125eca 100644 --- a/maintenance/updateDoubleWidthSearch.php +++ b/maintenance/updateDoubleWidthSearch.php @@ -34,7 +34,7 @@ class UpdateDoubleWidthSearch extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Script to normalize double-byte latin UTF-8 characters"; + $this->addDescription( 'Script to normalize double-byte latin UTF-8 characters' ); $this->addOption( 'q', 'quiet', false, true ); $this->addOption( 'l', @@ -51,13 +51,13 @@ class UpdateDoubleWidthSearch extends Maintenance { public function execute() { $maxLockTime = $this->getOption( 'l', 20 ); - $dbw = wfGetDB( DB_MASTER ); + $dbw = $this->getDB( DB_MASTER ); if ( $dbw->getType() !== 'mysql' ) { $this->error( "This change is only needed on MySQL, quitting.\n", true ); } $res = $this->findRows( $dbw ); - $this->updateSearchIndex( $maxLockTime, array( $this, 'searchIndexUpdateCallback' ), $dbw, $res ); + $this->updateSearchIndex( $maxLockTime, [ $this, 'searchIndexUpdateCallback' ], $dbw, $res ); $this->output( "Done\n" ); }