From: Umherirrender Date: Thu, 11 Oct 2018 19:13:35 +0000 (+0200) Subject: Avoid global $wgUpdateRowsPerQuery in WatchedItemStore X-Git-Tag: 1.34.0-rc.0~3788^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=1444e771068b5abdd9322a4647182ac92d8ccbbc;p=lhc%2Fweb%2Fwiklou.git Avoid global $wgUpdateRowsPerQuery in WatchedItemStore Change-Id: Ibff69d16919a595c3edb8e2b431aa42d84a2777a --- diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index b18db7626c..c76301046c 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -825,12 +825,10 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac $fname = __METHOD__; DeferredUpdates::addCallableUpdate( function () use ( $timestamp, $watchers, $target, $fname ) { - global $wgUpdateRowsPerQuery; - $dbw = $this->getConnectionRef( DB_MASTER ); $ticket = $this->lbFactory->getEmptyTransactionTicket( $fname ); - $watchersChunks = array_chunk( $watchers, $wgUpdateRowsPerQuery ); + $watchersChunks = array_chunk( $watchers, $this->updateRowsPerQuery ); foreach ( $watchersChunks as $watchersChunk ) { $dbw->update( 'watchlist', [ /* SET */