X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateDoubleWidthSearch.php;h=d28ae271f9b1b89300a9428bb11b8f2d05d41652;hb=efbfa0a727a196e63a2b71f0a82f09150c2be354;hp=5c21b40eb498af7f5c63af972930f4363ffde6c8;hpb=13e788862bc4349d732286970d57cd8375a7d774;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateDoubleWidthSearch.php b/maintenance/updateDoubleWidthSearch.php index 5c21b40eb4..d28ae271f9 100644 --- a/maintenance/updateDoubleWidthSearch.php +++ b/maintenance/updateDoubleWidthSearch.php @@ -1,6 +1,6 @@ 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', @@ -53,11 +53,11 @@ class UpdateDoubleWidthSearch extends Maintenance { $dbw = $this->getDB( DB_MASTER ); if ( $dbw->getType() !== 'mysql' ) { - $this->error( "This change is only needed on MySQL, quitting.\n", true ); + $this->fatalError( "This change is only needed on MySQL, quitting.\n" ); } $res = $this->findRows( $dbw ); - $this->updateSearchIndex( $maxLockTime, array( $this, 'searchIndexUpdateCallback' ), $dbw, $res ); + $this->updateSearchIndex( $maxLockTime, [ $this, 'searchIndexUpdateCallback' ], $dbw, $res ); $this->output( "Done\n" ); } @@ -77,5 +77,5 @@ class UpdateDoubleWidthSearch extends Maintenance { } } -$maintClass = "UpdateDoubleWidthSearch"; +$maintClass = UpdateDoubleWidthSearch::class; require_once RUN_MAINTENANCE_IF_MAIN;