Merge "Drop index oi_name_archive_name on table oldimage"
[lhc/web/wiklou.git] / includes / AjaxDispatcher.php
index 9142238..2adbc80 100644 (file)
@@ -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 {
                                }
                        }
                }
-
        }
 }