function getMasterDB() {
if ( !isset( $this->dbConn ) ) {
- $class = 'Database' . ucfirst( $this->dbType );
- $this->dbConn = new $class( $this->dbServer, $this->dbUser,
- $this->dbPassword, $this->dbName, $this->dbFlags,
- $this->tablePrefix );
+ $this->dbConn = DatabaseBase::factory( $this->dbType,
+ array(
+ 'host' => $this->dbServer,
+ 'user' => $this->dbUser,
+ 'password' => $this->dbPassword,
+ 'dbname' => $this->dbName,
+ 'flags' => $this->dbFlags,
+ 'tablePrefix' => $this->tablePrefix
+ )
+ );
}
return $this->dbConn;
}