From d81f562b712f2387fa02290bf2ca86392ab356f2 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 20:21:25 +0000 Subject: Aktualisierung auf Version 1.8.1 --- maintenance/update.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'maintenance/update.php') 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'] ) ) { -- cgit v1.2.2