Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php |
— | — | @@ -40,7 +40,6 @@ |
41 | 41 | require_once ( getenv('MW_INSTALL_PATH') !== false |
42 | 42 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
43 | 43 | : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' ); |
44 | | -require_once("$IP/maintenance/counter.php"); |
45 | 44 | |
46 | 45 | global $smwgEnableUpdateJobs, $wgServer; |
47 | 46 | $smwgEnableUpdateJobs = false; // do not fork additional update jobs while running this script |
— | — | @@ -100,11 +99,30 @@ |
101 | 100 | |
102 | 101 | print "Abort with control-c in the next five seconds ... "; |
103 | 102 | |
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"; |
107 | 123 | } |
108 | | - echo "\n"; |
| 124 | + // Remove up to here and just uncomment the following line: |
| 125 | + // wfCountDown( 6 ); |
| 126 | + |
109 | 127 | smwfGetStore()->drop($verbose); |
110 | 128 | wfRunHooks('smwDropTables'); |
111 | 129 | print "\n"; |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php |
— | — | @@ -17,7 +17,6 @@ |
18 | 18 | require_once ( getenv('MW_INSTALL_PATH') !== false |
19 | 19 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
20 | 20 | : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' ); |
21 | | -require_once("$IP/maintenance/counter.php"); |
22 | 21 | |
23 | 22 | $output_level = array_key_exists('quiet', $options)?0: |
24 | 23 | (array_key_exists('verbose', $options)?2:1); |
— | — | @@ -36,11 +35,28 @@ |
37 | 36 | outputMessage("\nDeleting concept caches. Use CTRL-C to abort.\n\n"); |
38 | 37 | $delay = 5; |
39 | 38 | 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"; |
43 | 58 | } |
44 | | - print "\n"; |
| 59 | + // Remove up to here and just uncomment the following line: |
| 60 | + // wfCountDown( $delay ); |
45 | 61 | } |
46 | 62 | } else { |
47 | 63 | $action = 'help'; |
Property changes on: trunk/extensions/SemanticMediaWiki/maintenance |
___________________________________________________________________ |
Name: svn:ignore |
48 | 64 | + run.bat |