From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- includes/db/LBFactory.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'includes/db/LBFactory.php') diff --git a/includes/db/LBFactory.php b/includes/db/LBFactory.php index 4551e2d7..cf522b20 100644 --- a/includes/db/LBFactory.php +++ b/includes/db/LBFactory.php @@ -177,6 +177,15 @@ abstract class LBFactory { }, array( $methodName, $args ) ); } + /** + * Commit on all connections. Done for two reasons: + * 1. To commit changes to the masters. + * 2. To release the snapshot on all connections, master and slave. + */ + public function commitAll() { + $this->forEachLBCallMethod( 'commitAll' ); + } + /** * Commit changes on all master connections */ @@ -199,7 +208,7 @@ abstract class LBFactory { */ public function hasMasterChanges() { $ret = false; - $this->forEachLB( function ( $lb ) use ( &$ret ) { + $this->forEachLB( function ( LoadBalancer $lb ) use ( &$ret ) { $ret = $ret || $lb->hasMasterChanges(); } ); return $ret; -- cgit v1.2.2