HTML 2???
[lhc/web/wiklou.git] / includes / filerepo / ForeignDBRepo.php
index 7a1053a..0311ebc 100644 (file)
@@ -35,10 +35,16 @@ class ForeignDBRepo extends LocalRepo {
 
        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;
        }