X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWatchedItemStore.php;h=9af5310ee10bac00cfa83599c203adc0f0555c10;hb=251b25d700dcaa7bca93864cb61ca4d719cfc6dd;hp=3cdc59cda0ebbf5e3ae9e0abf046276279631ed0;hpb=5b3fd5a4a974b1c7bca43d2032986f9630a4d6c5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php index 3cdc59cda0..9af5310ee1 100644 --- a/includes/WatchedItemStore.php +++ b/includes/WatchedItemStore.php @@ -2,8 +2,10 @@ use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; use MediaWiki\Linker\LinkTarget; +use MediaWiki\MediaWikiServices; use Wikimedia\Assert\Assert; use Wikimedia\ScopedCallback; +use Wikimedia\Rdbms\LoadBalancer; /** * Storage layer class for WatchedItems. @@ -734,7 +736,7 @@ class WatchedItemStore implements StatsdAwareInterface { global $wgUpdateRowsPerQuery; $dbw = $this->getConnectionRef( DB_MASTER ); - $factory = wfGetLBFactory(); + $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $ticket = $factory->getEmptyTransactionTicket( __METHOD__ ); $watchersChunks = array_chunk( $watchers, $wgUpdateRowsPerQuery );