From 461b00984b8bc5b131fbff883601179c821d2272 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 29 Jun 2006 17:23:30 +0000 Subject: [PATCH] Remove DBschema - too confusing with other uses of "schema" Add ts2schema and mwschema for postgres, config only: the user will absorb them --- config/index.php | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/config/index.php b/config/index.php index 14f53d4e15..3149f03bb9 100644 --- a/config/index.php +++ b/config/index.php @@ -479,17 +479,22 @@ print "
  • Environment check $conf->DBuser = importPost( "DBuser", "wikiuser" ); $conf->DBpassword = importPost( "DBpassword" ); $conf->DBpassword2 = importPost( "DBpassword2" ); - $conf->DBprefix = importPost( "DBprefix" ); - $conf->DBschema = importPost( "DBschema", "mediawiki" ); - $conf->DBport = importPost( "DBport", "5432" ); - $conf->DBmysql5 = (importPost( "DBmysql5" ) == "true") ? "true" : "false"; - $conf->RootUser = importPost( "RootUser", "root" ); - $conf->RootPW = importPost( "RootPW", "-" ); - $conf->LanguageCode = importPost( "LanguageCode", "en" ); $conf->SysopName = importPost( "SysopName", "WikiSysop" ); $conf->SysopPass = importPost( "SysopPass" ); $conf->SysopPass2 = importPost( "SysopPass2" ); + ## MySQL specific: + $conf->DBprefix = importPost( "DBprefix" ); + $conf->DBmysql5 = (importPost( "DBmysql5" ) == "true") ? "true" : "false"; + $conf->RootUser = importPost( "RootUser", "root" ); + $conf->RootPW = importPost( "RootPW", "-" ); + $conf->LanguageCode = importPost( "LanguageCode", "en" ); + + ## Postgres specific: + $conf->DBport = importPost( "DBport", "5432" ); + $conf->DBmwschema = importPost( "DBmwschema", "mediawiki" ); + $conf->DBts2schema = importPost( "DBts2schema", "public" ); + /* Check for validity */ $errs = array(); @@ -581,8 +586,15 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $wgDBtype = $conf->DBtype; $wgDBadminuser = "root"; $wgDBadminpassword = $conf->RootPW; + + ## Mysql specific: $wgDBprefix = $conf->DBprefix; - $wgDBport = $conf->DBport; + + ## Postgres specific: + $wgDBport = $conf->DBport; + $wgDBmwschema = $conf->DBmwschema; + $wgDBts2schema = $conf->DBts2schema; + $wgCommandLineMode = true; $wgUseDatabaseMessages = false; /* FIXME: For database failure */ require_once( "includes/Setup.php" ); @@ -1124,10 +1136,13 @@ if( count( $errs ) ) { aField( $conf, "DBport", "Database port:" ); ?>
    +
    -

    The username specified above will have it's search path set to the above schema, +

    The username specified above will have it's search path set to the above schemas, so it is recommended that you create a new user.

    @@ -1346,7 +1361,6 @@ if ( \$wgCommandLineMode ) { \$wgDBpassword = \"{$slconf['DBpassword']}\"; \$wgDBprefix = \"{$slconf['DBprefix']}\"; \$wgDBtype = \"{$slconf['DBtype']}\"; -\$wgDBschema = \"{$slconf['DBschema']}\"; \$wgDBport = \"{$slconf['DBport']}\"; # Experimental charset support for MySQL 4.1/5.0. -- 2.20.1