[LockManager] Updated DBLockManager for cross-wiki support.
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 1 Feb 2013 02:26:24 +0000 (18:26 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 1 Feb 2013 02:26:24 +0000 (18:26 -0800)
Change-Id: If02274a3173463ce66037221f494a1ee68ffa51d

includes/filebackend/lockmanager/DBLockManager.php

index 196a32a..8196d5b 100644 (file)
@@ -197,8 +197,8 @@ class DBLockManager extends QuorumLockManager {
                if ( !isset( $this->conns[$lockDb] ) ) {
                        $db = null;
                        if ( $lockDb === 'localDBMaster' ) {
-                               $lb = wfGetLBFactory()->newMainLB();
-                               $db = $lb->getConnection( DB_MASTER );
+                               $lb = wfGetLBFactory()->getMainLB( $this->wiki );
+                               $db = $lb->getConnection( DB_MASTER, array(), $this->wiki );
                        } elseif ( isset( $this->dbServers[$lockDb] ) ) {
                                $config = $this->dbServers[$lockDb];
                                $db = DatabaseBase::factory( $config['type'], $config );