(no bug) Fix per-connection db name in ORMTable.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 3 Dec 2012 17:20:29 +0000 (18:20 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 3 Dec 2012 17:22:09 +0000 (18:22 +0100)
ORMTable was bypassing the mechanism used by DBAccessBase to
ensure that the correct database name is selected when getting
a database connection.

Change-Id: Ic82ce46f1852dcaa5f52b40660ba4a9f52df22f6

includes/db/ORMTable.php

index 13c2d9f..a2ef944 100644 (file)
@@ -463,7 +463,7 @@ abstract class ORMTable extends DBAccessBase implements IORMTable {
         * @return DatabaseBase The database object
         */
        public function getReadDbConnection() {
-               return $this->getLoadBalancer()->getConnection( $this->getReadDb(), array(), $this->getTargetWiki() );
+               return $this->getConnection( $this->getReadDb(), array() );
        }
 
        /**
@@ -477,7 +477,7 @@ abstract class ORMTable extends DBAccessBase implements IORMTable {
         * @return DatabaseBase The database object
         */
        public function getWriteDbConnection() {
-               return $this->getLoadBalancer()->getConnection( DB_MASTER, array(), $this->getTargetWiki() );
+               return $this->getConnection( DB_MASTER, array() );
        }
 
        /**