r5262 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5261‎ | r5262 | r5263 >
Date:13:47, 17 September 2004
Author:midom
Status:old
Tags:
Comment:
Add schema (logical namespace) support, table prefixes are not needed for PG...
Modified paths:
  • /trunk/phase3/includes/DatabasePostgreSQL.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -162,8 +162,15 @@
163163 $wgDBtype = "mysql";
164164 /** Table name prefix */
165165 $wgDBprefix = '';
 166+/** Database schema
 167+ * on some databases this allows separate
 168+ * logical namespace for application data
 169+ */
 170+$wgDBschema = 'mediawiki';
166171 /**#@-*/
167172
 173+
 174+
168175 # Shared database for multiple wikis.
169176 # Presently used for storing a user table for single sign-on
170177 # The server for this database must be the same as for the main
Index: trunk/phase3/includes/DatabasePostgreSQL.php
@@ -53,6 +53,8 @@
5454 die( "PostgreSQL functions missing, have you compiled PHP with the --with-pgsql option?\n" );
5555 }
5656
 57+ global $wgDBschema;
 58+
5759 $this->close();
5860 $this->mServer = $server;
5961 $this->mUser = $user;
@@ -75,6 +77,7 @@
7678 } else {
7779 $this->mOpened = true;
7880 }
 81+ $this->query("SET search_path = $wgDBschema,public");
7982 }
8083 return $this->mConn;
8184 }

Status & tagging log