r25929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25928‎ | r25929 | r25930 >
Date:02:31, 19 September 2007
Author:greg
Status:old
Tags:
Comment:
Set search_path on Postgres if wgDBmwschema != 'mediawiki' to support multiple wikis for a single user, per discussion on bug 11136
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DatabasePostgres.php
@@ -486,6 +486,15 @@
487487 $this->doQuery("SET client_min_messages = 'ERROR'");
488488 }
489489
 490+ global $wgDBmwschema, $wgDBts2schema;
 491+ if (isset( $wgDBmwschema ) && isset( $wgDBts2schema )
 492+ && $wgDBmwschema !== 'mediawiki'
 493+ && preg_match( '/^\w+$/', $wgDBmwschema )
 494+ && preg_match( '/^\w+$/', $wgDBts2schema )
 495+ ) {
 496+ $this->doQuery("SET search_path = $wgDBmwschema, $wgDBts2schema, public");
 497+ }
 498+
490499 return $this->mConn;
491500 }
492501
Index: trunk/phase3/RELEASE-NOTES
@@ -24,8 +24,9 @@
2525 * Add a warning for non-descriptive filenames at Special:Upload
2626 * Add {{filepath:}} parser function to get full path to an uploaded file,
2727 complementing {{fullurl:}} for pages.
 28+* (bug 11136) If using Postgres, search path is explicitly set if wgDBmwschema is
 29+ not set to 'mediawiki', allowing multiple mediawiki instances per user.
2830
29 -
3031 === Bug fixes in 1.12 ===
3132
3233 * Subpages are now indexed for searching properly when using PostgreSQL

Follow-up revisions

RevisionCommit summaryAuthorDate
r25932Merged revisions 25861-25931 via svnmerge from...david06:43, 19 September 2007

Status & tagging log