[Fusionforge-commits] r15785 - in branches/Branch_5_2: . src/plugins/mediawiki/www

Roland Mas lolando at fusionforge.org
Thu Jun 14 16:24:30 CEST 2012


Author: lolando
Date: 2012-06-14 16:24:29 +0200 (Thu, 14 Jun 2012)
New Revision: 15785

Modified:
   branches/Branch_5_2/
   branches/Branch_5_2/src/plugins/mediawiki/www/LocalSettings.php
Log:
Merged from Evolvis: Mediawiki: wrap DatabasePostgres::open() and append public to the search path

Modified: branches/Branch_5_2/src/plugins/mediawiki/www/LocalSettings.php
===================================================================
--- branches/Branch_5_2/src/plugins/mediawiki/www/LocalSettings.php	2012-06-14 14:24:23 UTC (rev 15784)
+++ branches/Branch_5_2/src/plugins/mediawiki/www/LocalSettings.php	2012-06-14 14:24:29 UTC (rev 15785)
@@ -86,6 +86,18 @@
 		    $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':




More information about the Fusionforge-commits mailing list