X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=2adbc80f3b4d7e8735cf101281b142acd975b2d1;hb=4838f88d844056d475967a96d592f1271cc987bf;hp=91422385a2254499c0269082abb1079751a86d9d;hpb=b5906606e1aa1a795231fb813b766818b1dd6c25;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 91422385a2..2adbc80f3b 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -21,6 +21,8 @@ * @ingroup Ajax */ +use MediaWiki\MediaWikiServices; + /** * @defgroup Ajax Ajax */ @@ -90,7 +92,6 @@ class AjaxDispatcher { # Or we could throw an exception: # throw new MWException( __METHOD__ . ' called without any data (mode empty).' ); } - } /** @@ -136,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(); @@ -156,6 +158,5 @@ class AjaxDispatcher { } } } - } }