implement #1667, 5 second countdown before crashing database. Patch by ��var Arnfj...
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 9 Mar 2005 15:12:19 +0000 (15:12 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 9 Mar 2005 15:12:19 +0000 (15:12 +0000)
maintenance/update.php

index 1bd6cb2..415b60f 100644 (file)
@@ -15,9 +15,13 @@ $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 or...\n";
-sleep(5);
+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();