From: Brion Vibber Date: Mon, 25 Apr 2005 12:03:57 +0000 (+0000) Subject: add --quick option to skip the 5 second "you are destroying your wiki omfg" warning X-Git-Tag: 1.5.0alpha1~138 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=718e54bdfa629a9bb3cafb4f9de19efe56d68828;p=lhc%2Fweb%2Fwiklou.git add --quick option to skip the 5 second "you are destroying your wiki omfg" warning --- diff --git a/maintenance/update.php b/maintenance/update.php index 415b60fa79..5fad4b9205 100644 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -8,6 +8,7 @@ */ /** */ +$options = array( 'quick' ); require_once( "commandLine.inc" ); require_once( "updaters.inc" ); $wgTitle = Title::newFromText( "MediaWiki database updater" ); @@ -15,12 +16,15 @@ $wgDatabase = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpa print "Going to run database updates for $wgDBname\n"; print "Depending on the size of your database this may take a while!\n"; -print "Abort with control-c in the next five seconds to aboard.. "; -for ($i = 5; $i >= 0; --$i) { - echo $i; - sleep(1); - echo( ($i == 0) ? "\n" : chr(8) ); +if( !isset( $options['quick'] ) ) { + print "Abort with control-c in the next five seconds to aboard.. "; + + for ($i = 5; $i >= 0; --$i) { + echo $i; + sleep(1); + echo( ($i == 0) ? "\n" : chr(8) ); + } } do_all_updates();