Merge "mw.Upload.BookletLayout: Don't explode when the API call fails with 'exception'"
[lhc/web/wiklou.git] / maintenance / updateDoubleWidthSearch.php
index f863697..5c21b40 100644 (file)
@@ -51,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 );
                }
@@ -72,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__ );
        }
 }