Avoid global $wgUpdateRowsPerQuery in WatchedItemStore
authorUmherirrender <umherirrender_de.wp@web.de>
Thu, 11 Oct 2018 19:13:35 +0000 (21:13 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Fri, 12 Oct 2018 13:21:02 +0000 (13:21 +0000)
Change-Id: Ibff69d16919a595c3edb8e2b431aa42d84a2777a

includes/watcheditem/WatchedItemStore.php

index b18db76..c763010 100644 (file)
@@ -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 */