X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateDoubleWidthSearch.php;h=5c21b40eb498af7f5c63af972930f4363ffde6c8;hb=44cebea941236e165bf55e80565d6679529c7280;hp=41988d1b259be913565526d3e294ee85dd7c32d8;hpb=3a7e36b2d6f7a77ee1fbc356f277ee4bf0aeb60c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateDoubleWidthSearch.php b/maintenance/updateDoubleWidthSearch.php index 41988d1b25..5c21b40eb4 100644 --- a/maintenance/updateDoubleWidthSearch.php +++ b/maintenance/updateDoubleWidthSearch.php @@ -36,7 +36,12 @@ class UpdateDoubleWidthSearch extends Maintenance { parent::__construct(); $this->mDescription = "Script to normalize double-byte latin UTF-8 characters"; $this->addOption( 'q', 'quiet', false, true ); - $this->addOption( 'l', 'How long the searchindex and revision tables will be locked for', false, true ); + $this->addOption( + 'l', + 'How long the searchindex and revision tables will be locked for', + false, + true + ); } public function getDbType() { @@ -46,7 +51,7 @@ 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 ); } @@ -67,6 +72,7 @@ class UpdateDoubleWidthSearch extends Maintenance { $sql = "SELECT si_page FROM $searchindex WHERE ( si_text RLIKE '$regexp' ) OR ( si_title RLIKE '$regexp' )"; + return $dbw->query( $sql, __METHOD__ ); } }