Update ImportableUploadRevisionImporter for interwiki usernames
[lhc/web/wiklou.git] / includes / AjaxDispatcher.php
index d444a27..75fcff3 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Ajax
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * @defgroup Ajax Ajax
  */
@@ -54,6 +56,7 @@ class AjaxDispatcher {
 
        /**
         * Load up our object with user supplied data
+        * @param Config $config
         */
        function __construct( Config $config ) {
                $this->config = $config;
@@ -135,7 +138,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();