summaryrefslogtreecommitdiff
path: root/maintenance/update.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
commitd81f562b712f2387fa02290bf2ca86392ab356f2 (patch)
treed666cdefbe6ac320827a2c6cb473581b46e22c4c /maintenance/update.php
parent183851b06bd6c52f3cae5375f433da720d410447 (diff)
Aktualisierung auf Version 1.8.1
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'] ) ) {