From: Andrew Garrett Date: Tue, 8 Sep 2009 13:18:06 +0000 (+0000) Subject: Pull wgDBuser and wgDBpassword if adminuser and adminpassword are undefined, fixes... X-Git-Tag: 1.31.0-rc.0~39857 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=502d30926aa8345776971bdbf08ab5878797e4e9;p=lhc%2Fweb%2Fwiklou.git Pull wgDBuser and wgDBpassword if adminuser and adminpassword are undefined, fixes dumpBackup.php --- diff --git a/maintenance/backup.inc b/maintenance/backup.inc index e2e5363ece..e546df4f86 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -234,8 +234,16 @@ class BackupDumper { function backupDb() { global $wgDBadminuser, $wgDBadminpassword; + global $wgDBuser, $wgDBpassword; global $wgDBname, $wgDebugDumpSql, $wgDBtype; $flags = ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT; // god-damn hack + + if ( !$wgDBadminuser ) { + $wgDBadminuser = $wgDBuser; + } + if ( !$wgDBadminpassword ) { + $wgDBadminpassword = $wgDBpassword; + } $class = 'Database' . ucfirst($wgDBtype); $db = new $class( $this->backupServer(), $wgDBadminuser, $wgDBadminpassword, $wgDBname, false, $flags );