Revision: 53120
Author:   vrandezo
Date:     2009-07-11 20:15:43 +0000 (Sat, 11 Jul 2009)

Log Message:
-----------
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_conceptCache.php
    trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php

Property Changed:
----------------
    trunk/extensions/SemanticMediaWiki/maintenance/


Property changes on: trunk/extensions/SemanticMediaWiki/maintenance
___________________________________________________________________
Added: svn:ignore
   + run.bat


Modified: trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php 
2009-07-11 19:14:31 UTC (rev 53119)
+++ trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php 
2009-07-11 20:15:43 UTC (rev 53120)
@@ -17,7 +17,6 @@
 require_once ( getenv('MW_INSTALL_PATH') !== false
     ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
     : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' );
-require_once("$IP/maintenance/counter.php");
 
 $output_level  = array_key_exists('quiet', $options)?0:
                  (array_key_exists('verbose', $options)?2:1);
@@ -36,11 +35,28 @@
        outputMessage("\nDeleting concept caches. Use CTRL-C to abort.\n\n");
        $delay = 5;
        if (outputMessage(print "Waiting for $delay seconds ...  ")) {
-               for ($i = $delay+1; $i >= 1;) {
-                       print_c($i, --$i);
-                       sleep(1);
+               // TODO
+               // Remove the following section and replace it with a simple
+               // wfCountDown as soon as we switch to MediaWiki 1.16. 
+               // Currently, wfCountDown is only supported from
+               // revision 51650 (Jun 9 2009) onward.
+               if (function_exists("wfCountDown")) {
+                       wfCountDown( $delay );  
+               } else {
+               for ( $i = $delay; $i >= 0; $i-- ) {
+                       if ( $i != $delay ) {
+                       echo str_repeat( "\x08", strlen( $i + 1 ) );
+                       } 
+                       echo $i;
+                       flush();
+               if ( $i ) {
+                       sleep( 1 );
+                       }
+               }
+               echo "\n";              
                }
-               print "\n";
+               // Remove up to here and just uncomment the following line:
+               // wfCountDown( $delay );
        }
 } else {
        $action = 'help';

Modified: trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php  
2009-07-11 19:14:31 UTC (rev 53119)
+++ trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php  
2009-07-11 20:15:43 UTC (rev 53120)
@@ -40,7 +40,6 @@
 require_once ( getenv('MW_INSTALL_PATH') !== false
     ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
     : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' );
-require_once("$IP/maintenance/counter.php");
 
 global $smwgEnableUpdateJobs, $wgServer;
 $smwgEnableUpdateJobs = false; // do not fork additional update jobs while 
running this script
@@ -100,11 +99,30 @@
 
        print "Abort with control-c in the next five seconds ...  ";
 
-       for ($i = 6; $i >= 1;) {
-               print_c($i, --$i);
-               sleep(1);
+       // TODO
+       // Remove the following section and replace it with a simple
+       // wfCountDown as soon as we switch to MediaWiki 1.16. 
+       // Currently, wfCountDown is only supported from
+       // revision 51650 (Jun 9 2009) onward.
+       $n = 6;
+       if (function_exists("wfCountDown")) {
+               wfCountDown( $n );      
+       } else {
+       for ( $i = $n; $i >= 0; $i-- ) {
+               if ( $i != $n ) {
+               echo str_repeat( "\x08", strlen( $i + 1 ) );
+               } 
+               echo $i;
+               flush();
+               if ( $i ) {
+               sleep( 1 );
+               }
+       }
+       echo "\n";              
        }
-       echo "\n";
+       // Remove up to here and just uncomment the following line:
+       // wfCountDown( 6 );
+
        smwfGetStore()->drop($verbose);
        wfRunHooks('smwDropTables');
        print "\n";



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to