summaryrefslogtreecommitdiff
path: root/maintenance/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/update.php')
-rw-r--r--maintenance/update.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/maintenance/update.php b/maintenance/update.php
index 8643aa79..d2dcbf92 100644
--- a/maintenance/update.php
+++ b/maintenance/update.php
@@ -15,8 +15,6 @@ require_once( "commandLine.inc" );
require_once( "updaters.inc" );
$wgTitle = Title::newFromText( "MediaWiki database updater" );
$dbclass = 'Database' . ucfirst( $wgDBtype ) ;
-require_once("$dbclass.php");
-$dbc = new $dbclass;
echo( "MediaWiki {$wgVersion} Updater\n\n" );
@@ -32,20 +30,16 @@ if( !isset( $wgDBadminuser ) || !isset( $wgDBadminpassword ) ) {
# Attempt to connect to the database as a privileged user
# This will vomit up an error if there are permissions problems
-$wgDatabase = $dbc->newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1 );
+$wgDatabase = new $dbclass( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1 );
if( !$wgDatabase->isOpen() ) {
# Appears to have failed
echo( "A connection to the database could not be established. Check the\n" );
- # Let's be a bit clever and guess at what's wrong
- if( isset( $wgDBadminuser ) && isset( $wgDBadminpassword ) ) {
- # Tell the user the value(s) are wrong
- echo( 'values of $wgDBadminuser and $wgDBadminpassword.' . "\n" );
- }
+ echo( "values of \$wgDBadminuser and \$wgDBadminpassword.\n" );
exit();
}
-print "Going to run database updates for $wgDBname\n";
+print "Going to run database updates for ".wfWikiID()."\n";
print "Depending on the size of your database this may take a while!\n";
if( !isset( $options['quick'] ) ) {