From: Brion Vibber Date: Wed, 1 Sep 2004 18:16:32 +0000 (+0000) Subject: Set $wgDBadminuser and $wgDBadminpassword to root when using the root X-Git-Tag: 1.5.0alpha1~2180 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=ba2df41e4401e6298539be37ddd8efc0ead2cd50;p=lhc%2Fweb%2Fwiklou.git Set $wgDBadminuser and $wgDBadminpassword to root when using the root login so that certain db upgrade steps (eg convertLinks.inc) will not try to use the unprivileges database account to do restructuring. This fixes the problem with upgrading wikis created by the old command-line installer dying at the link table conversion. --- diff --git a/config/index.php b/config/index.php index 2a6567bca6..09a7b37699 100644 --- a/config/index.php +++ b/config/index.php @@ -372,8 +372,8 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $wgCommandLineMode = false; chdir( ".." ); eval($local); - $wgDBadminuser = $wgDBuser; - $wgDBadminpassword = $wgDBpassword; + $wgDBadminuser = "root"; + $wgDBadminpassword = $conf->RootPW; $wgCommandLineMode = true; $wgUseDatabaseMessages = false; /* FIXME: For database failure */ require_once( "includes/Setup.php" ); @@ -400,6 +400,8 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { } else { print "
  • Trying regular user...\n"; /* Try the regular user... */ + $wgDBadminuser = $wgDBuser; + $wgDBadminpassword = $wgDBpassword; $wgDatabase = Database::newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, "", 1 ); $wgDatabase->isOpen(); $wgDatabase->mIgnoreErrors = true;