Index: trunk/phase3/maintenance/backup.inc |
— | — | @@ -234,8 +234,16 @@ |
235 | 235 | |
236 | 236 | function backupDb() { |
237 | 237 | global $wgDBadminuser, $wgDBadminpassword; |
| 238 | + global $wgDBuser, $wgDBpassword; |
238 | 239 | global $wgDBname, $wgDebugDumpSql, $wgDBtype; |
239 | 240 | $flags = ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT; // god-damn hack |
| 241 | + |
| 242 | + if ( !$wgDBadminuser ) { |
| 243 | + $wgDBadminuser = $wgDBuser; |
| 244 | + } |
| 245 | + if ( !$wgDBadminpassword ) { |
| 246 | + $wgDBadminpassword = $wgDBpassword; |
| 247 | + } |
240 | 248 | |
241 | 249 | $class = 'Database' . ucfirst($wgDBtype); |
242 | 250 | $db = new $class( $this->backupServer(), $wgDBadminuser, $wgDBadminpassword, $wgDBname, false, $flags ); |