Merge "Segment stash edit cache stats by basis for hit/miss"
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 8c55d9a..5c42bc2 100644 (file)
@@ -3109,9 +3109,6 @@ function wfSplitWikiID( $wiki ) {
  * Note 2: use $this->getDB() in maintenance scripts that may be invoked by
  * updater to ensure that a proper database is being updated.
  *
- * @todo Replace calls to wfGetDB with calls to LoadBalancer::getConnection()
- *       on an injected instance of LoadBalancer.
- *
  * @return DatabaseBase
  */
 function wfGetDB( $db, $groups = [], $wiki = false ) {
@@ -3121,30 +3118,20 @@ function wfGetDB( $db, $groups = [], $wiki = false ) {
 /**
  * Get a load balancer object.
  *
- * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancer()
- *              or MediaWikiServices::getDBLoadBalancerFactory() instead.
- *
  * @param string|bool $wiki Wiki ID, or false for the current wiki
  * @return LoadBalancer
  */
 function wfGetLB( $wiki = false ) {
-       if ( $wiki === false ) {
-               return \MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancer();
-       } else {
-               $factory = \MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-               return $factory->getMainLB( $wiki );
-       }
+       return wfGetLBFactory()->getMainLB( $wiki );
 }
 
 /**
  * Get the load balancer factory object
  *
- * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() instead.
- *
  * @return LBFactory
  */
 function wfGetLBFactory() {
-       return \MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+       return LBFactory::singleton();
 }
 
 /**