From 502d30926aa8345776971bdbf08ab5878797e4e9 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 8 Sep 2009 13:18:06 +0000 Subject: [PATCH] Pull wgDBuser and wgDBpassword if adminuser and adminpassword are undefined, fixes dumpBackup.php --- maintenance/backup.inc | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ); -- 2.20.1