From 10deba116d7251fe2bf32cccae083c8a689e5655 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 9 Jun 2008 21:42:54 +0000 Subject: [PATCH] * (bug 14392) Fix regression breaking table prefix in installer Problem was a second DBprefix field in the installer, for the MS SQL-specific options. This second field would be blank, overwriting the first submission from the MySQL-specific section. Have renamed that field to DBprefix2, so it won't conflict. Haven't tested on MSSQL of course. . . ;) --- config/index.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/config/index.php b/config/index.php index 52b4441679..591f7d68fb 100644 --- a/config/index.php +++ b/config/index.php @@ -612,6 +612,11 @@ print "
  • Environment check ## SQLite specific $conf->SQLiteDataDir = importPost( "SQLiteDataDir", "" ); + + ## MSSQL specific + // We need a second field so it doesn't overwrite the MySQL one + $conf->DBprefix2 = importPost( "DBprefix2" ); + /* Check for validity */ $errs = array(); @@ -767,6 +772,11 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $wgDBmwschema = $conf->DBmwschema; $wgDBts2schema = $conf->DBts2schema; + if( $conf->DBprefix2 != '' ) { + // For MSSQL + $wgDBprefix = $conf->DBprefix2; + } + $wgCommandLineMode = true; if (! defined ( 'STDERR' ) ) define( 'STDERR', fopen("php://stderr", "wb")); @@ -1459,7 +1469,7 @@ if( count( $errs ) ) {

    If you need to share one database between multiple wikis, or @@ -1632,6 +1642,10 @@ function writeLocalSettings( $conf ) { $dbsettings = "# SQLite-specific settings \$wgSQLiteDataDir = \"{$slconf['SQLiteDataDir']}\";"; + } elseif( $conf->DBtype == 'mssql' ) { + $dbsettings = +"# MSSQL specific settings +\$wgDBprefix = \"{$slconf['DBprefix2']}\";"; } else { // ummm... :D $dbsettings = ''; -- 2.20.1