r53119 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53118‎ | r53119 | r53120 >
Date:19:14, 11 July 2009
Author:vrandezo
Status:deferred
Tags:
Comment:
counter.php has been removed, changed to wfCountDown (or a replacement as long as MW1.16 is not released)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/maintenance/SMW_setup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_setup.php
@@ -14,7 +14,7 @@
1515 * php SMW_refreshData.php [options...]
1616 *
1717 * -b <backend> Execute the operation for the storage backend of the given name
18 - * -user <dbuser> Database user account to use for chaning DB layout
 18+ * -user <dbuser> Database user account to use for changing DB layout
1919 * -password <dbpassword> Password for user account
2020 * NOTE: specifying user credentials in a command line call will usually store them
2121 * within the shell history file. For security, provide credentials in Adminssetings.php
@@ -45,7 +45,6 @@
4646 require_once ( getenv('MW_INSTALL_PATH') !== false
4747 ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
4848 : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' );
49 -require_once("$IP/maintenance/counter.php");
5049
5150 global $smwgDefaultStore;
5251
@@ -90,11 +89,29 @@
9190
9291 print "Abort with CTRL-C in the next $delay seconds ... ";
9392
94 - for ($i = $delay+1; $i >= 1;) {
95 - print_c($i, --$i);
96 - sleep(1);
 93+ // TODO
 94+ // Remove the following section and replace it with a simple
 95+ // wfCountDown as soon as we switch to MediaWiki 1.16.
 96+ // Currently, wfCountDown is only supported from
 97+ // revision 51650 (Jun 9 2009) onward.
 98+ if (function_exists("wfCountDown")) {
 99+ wfCountDown( $delay );
 100+ } else {
 101+ for ( $i = $delay; $i >= 0; $i-- ) {
 102+ if ( $i != $delay ) {
 103+ echo str_repeat( "\x08", strlen( $i + 1 ) );
 104+ }
 105+ echo $i;
 106+ flush();
 107+ if ( $i ) {
 108+ sleep( 1 );
 109+ }
 110+ }
 111+ echo "\n";
97112 }
98 - echo "\n";
 113+ // Remove up to here and just uncomment the following line:
 114+ // wfCountDown( $delay );
 115+
99116 smwfGetStore()->drop(true);
100117 wfRunHooks('smwDropTables');
101118 print "\n";

Status & tagging log