using new commandLine.inc style, readconsole() moved to install-utils()
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 13 Jun 2004 04:36:53 +0000 (04:36 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 13 Jun 2004 04:36:53 +0000 (04:36 +0000)
maintenance/eval.php
maintenance/mcc.php

index 911fde4..6c59d0c 100755 (executable)
@@ -1,10 +1,5 @@
 <?php
-/*require_once( "../includes/DefaultSettings.php" );
-require_once( "../LocalSettings.php" );
-require_once( "../includes/MemCachedClient.inc.php" );*/
-
-
-require_once( "liveCmdLine.inc" );
+require_once( "commandLine.inc" );
 
 do {
        $line = readconsole( "> " );
@@ -14,17 +9,6 @@ do {
        }
 } while ( 1 );
 
-function readconsole( $prompt = "" ) {
-       if ( function_exists( "readline" ) ) {
-               return readline( $prompt );
-       } else {
-               print $prompt;
-               $fp = fopen( "php://stdin", "r" );
-               $resp = trim( fgets( $fp, 1024 ) );
-               fclose( $fp );
-               return $resp;
-       }
-}
 
 
 
index f0b6826..6ebbfc1 100755 (executable)
@@ -1,10 +1,6 @@
 <?php
-/*require_once( "../includes/DefaultSettings.php" );
-require_once( "../LocalSettings.php" );
-require_once( "../includes/MemCachedClient.inc.php" );*/
 
-
-require_once( "liveCmdLine.inc" );
+require_once( "commandLine.inc" );
 
 $mcc = new memcached( array('persistant' => true) );
 $mcc->set_servers( $wgMemCachedServers );
@@ -68,19 +64,5 @@ do {
        }
 } while ( !$quit );
 
-function readconsole( $prompt = "" ) {
-       if ( function_exists( "readline" ) ) {
-               return readline( $prompt );
-       } else {
-               print $prompt;
-               $fp = fopen( "php://stdin", "r" );
-               $resp = trim( fgets( $fp, 1024 ) );
-               fclose( $fp );
-               return $resp;
-       }
-}
-
-
-
 ?>