removeDuplicates = true; } public function run() { $dbw = MediaWikiServices::getInstance()->getConnectionProvider()->getPrimaryDatabase(); $dbw->newUpdateQueryBuilder() ->update( 'user' ) ->set( [ 'user_editcount' => $this->params['editCount'] ] ) ->where( [ 'user_id' => $this->params['userId'], $dbw->expr( 'user_editcount', '=', null )->or( 'user_editcount', '<', $this->params['editCount'] ) ] ) ->caller( __METHOD__ )->execute(); return true; } }