Merge "Drop index oi_name_archive_name on table oldimage"
[lhc/web/wiklou.git] / includes / AjaxDispatcher.php
index d444a27..2adbc80 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Ajax
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * @defgroup Ajax Ajax
  */
@@ -135,7 +137,8 @@ class AjaxDispatcher {
                                        }
 
                                        // Make sure DB commit succeeds before sending a response
-                                       wfGetLBFactory()->commitMasterChanges( __METHOD__ );
+                                       $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+                                       $lbFactory->commitMasterChanges( __METHOD__ );
 
                                        $result->sendHeaders();
                                        $result->printText();