}
class DatabaseForge extends DatabasePostgres {
- function DatabaseForge($server=false, $user=false, $password=false,
+ function __construct($server=false, $user=false, $password=false,
$dbName=false, $failFunction=false, $flags=0) {
global $wgDBtype;
$wgDBtype = "postgres";
- return DatabasePostgres::DatabasePostgres($server, $user,
+ return parent::__construct($server, $user,
$password, $dbName, $failFunction, $flags);
}
+ function open($server, $user, $password, $dbName) {
+ $v = DatabasePostgres::open($server, $user, $password, $dbName);
+
+ global $wgDBmwschema;
+ if ($this->schemaExists($wgDBmwschema)) {
+ $safeschema = $this->addIdentifierQuotes($wgDBmwschema);
+ $this->doQuery("SET search_path TO $safeschema,public");
+ }
+
+ return $v;
+ }
+
function tableName($name, $format='quoted') {
switch ($name) {
case 'interwiki':