Merge "Handle missing namespace prefix in XML dumps more gracefully"
[lhc/web/wiklou.git] / includes / WatchedItemStore.php
index 3cdc59c..9af5310 100644 (file)
@@ -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 );