r53120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53119‎ | r53120 | r53121 >
Date:20:15, 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 (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php
@@ -40,7 +40,6 @@
4141 require_once ( getenv('MW_INSTALL_PATH') !== false
4242 ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
4343 : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' );
44 -require_once("$IP/maintenance/counter.php");
4544
4645 global $smwgEnableUpdateJobs, $wgServer;
4746 $smwgEnableUpdateJobs = false; // do not fork additional update jobs while running this script
@@ -100,11 +99,30 @@
101100
102101 print "Abort with control-c in the next five seconds ... ";
103102
104 - for ($i = 6; $i >= 1;) {
105 - print_c($i, --$i);
106 - sleep(1);
 103+ // TODO
 104+ // Remove the following section and replace it with a simple
 105+ // wfCountDown as soon as we switch to MediaWiki 1.16.
 106+ // Currently, wfCountDown is only supported from
 107+ // revision 51650 (Jun 9 2009) onward.
 108+ $n = 6;
 109+ if (function_exists("wfCountDown")) {
 110+ wfCountDown( $n );
 111+ } else {
 112+ for ( $i = $n; $i >= 0; $i-- ) {
 113+ if ( $i != $n ) {
 114+ echo str_repeat( "\x08", strlen( $i + 1 ) );
 115+ }
 116+ echo $i;
 117+ flush();
 118+ if ( $i ) {
 119+ sleep( 1 );
 120+ }
 121+ }
 122+ echo "\n";
107123 }
108 - echo "\n";
 124+ // Remove up to here and just uncomment the following line:
 125+ // wfCountDown( 6 );
 126+
109127 smwfGetStore()->drop($verbose);
110128 wfRunHooks('smwDropTables');
111129 print "\n";
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php
@@ -17,7 +17,6 @@
1818 require_once ( getenv('MW_INSTALL_PATH') !== false
1919 ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
2020 : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' );
21 -require_once("$IP/maintenance/counter.php");
2221
2322 $output_level = array_key_exists('quiet', $options)?0:
2423 (array_key_exists('verbose', $options)?2:1);
@@ -36,11 +35,28 @@
3736 outputMessage("\nDeleting concept caches. Use CTRL-C to abort.\n\n");
3837 $delay = 5;
3938 if (outputMessage(print "Waiting for $delay seconds ... ")) {
40 - for ($i = $delay+1; $i >= 1;) {
41 - print_c($i, --$i);
42 - sleep(1);
 39+ // TODO
 40+ // Remove the following section and replace it with a simple
 41+ // wfCountDown as soon as we switch to MediaWiki 1.16.
 42+ // Currently, wfCountDown is only supported from
 43+ // revision 51650 (Jun 9 2009) onward.
 44+ if (function_exists("wfCountDown")) {
 45+ wfCountDown( $delay );
 46+ } else {
 47+ for ( $i = $delay; $i >= 0; $i-- ) {
 48+ if ( $i != $delay ) {
 49+ echo str_repeat( "\x08", strlen( $i + 1 ) );
 50+ }
 51+ echo $i;
 52+ flush();
 53+ if ( $i ) {
 54+ sleep( 1 );
 55+ }
 56+ }
 57+ echo "\n";
4358 }
44 - print "\n";
 59+ // Remove up to here and just uncomment the following line:
 60+ // wfCountDown( $delay );
4561 }
4662 } else {
4763 $action = 'help';
Property changes on: trunk/extensions/SemanticMediaWiki/maintenance
___________________________________________________________________
Name: svn:ignore
4864 + run.bat

Status & tagging log