From 183851b06bd6c52f3cae5375f433da720d410447 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 18:12:39 +0000 Subject: MediaWiki 1.7.1 wiederhergestellt --- maintenance/update.php | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 maintenance/update.php (limited to 'maintenance/update.php') diff --git a/maintenance/update.php b/maintenance/update.php new file mode 100644 index 00000000..8643aa79 --- /dev/null +++ b/maintenance/update.php @@ -0,0 +1,71 @@ +newFromParams( $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" ); + } + exit(); +} + +print "Going to run database updates for $wgDBname\n"; +print "Depending on the size of your database this may take a while!\n"; + +if( !isset( $options['quick'] ) ) { + print "Abort with control-c in the next five seconds... "; + + for ($i = 6; $i >= 1;) { + print_c($i, --$i); + sleep(1); + } + echo "\n"; +} + +if ( isset( $options['doshared'] ) ) { + $doShared = true; +} else { + $doShared = false; +} + +do_all_updates( $doShared ); + +print "Done.\n"; + +?> -- cgit v1.2.2