X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=2adbc80f3b4d7e8735cf101281b142acd975b2d1;hb=fb4821adfc3ab95d9c5c0be1162139f99bfebf6c;hp=91422385a2254499c0269082abb1079751a86d9d;hpb=fc1ca75323b5f424a9f8d28d42d85a311ed2f721;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 { } } } - } }