Merge "Ignore tagfilter url parameter on Special:Undelete"
[lhc/web/wiklou.git] / includes / db / LBFactory.php
index 0e89a5b..0742df2 100644 (file)
@@ -43,7 +43,7 @@ abstract class LBFactory {
         *
         * @return LBFactory
         */
-       public static function &singleton() {
+       public static function singleton() {
                global $wgLBFactoryConf;
 
                if ( is_null( self::$instance ) ) {
@@ -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
         */