diff options
author | nobody <nobody@localhost> | 2004-06-27 00:05:32 +0000 |
---|---|---|
committer | nobody <nobody@localhost> | 2004-06-27 00:05:32 +0000 |
commit | 0c1d741ff4792d486258b390cf50cf3f9e229511 (patch) | |
tree | 55961c46b433ade0739763bee2ba3c4843d13751 /maintenance/mcc.php | |
parent | d5c8171a3157337557bc54ecb730d7dd35778ca3 (diff) | |
parent | 1aaed5fd7c7f4d7ea7abbfc7915bab5954d60a30 (diff) | |
download | mediawikicore-1.3.0beta4a.tar.gz mediawikicore-1.3.0beta4a.zip |
This commit was manufactured by cvs2svn to create tag1.3.0beta4a
'REL1_3_0beta4a'.
Diffstat (limited to 'maintenance/mcc.php')
-rwxr-xr-x | maintenance/mcc.php | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/maintenance/mcc.php b/maintenance/mcc.php index a6b524916ac5..6ebbfc1b35f7 100755 --- a/maintenance/mcc.php +++ b/maintenance/mcc.php @@ -1,10 +1,10 @@ <?php -require_once( "../includes/DefaultSettings.php" ); -require_once( "../LocalSettings.php" ); -require_once( "../includes/MemCachedClient.inc.php" ); -$mcc = new MemCachedClient(); +require_once( "commandLine.inc" ); + +$mcc = new memcached( array('persistant' => true) ); $mcc->set_servers( $wgMemCachedServers ); +$mcc->set_debug( true ); do { $bad = false; @@ -20,7 +20,8 @@ do { $res = $res[$args[1]]; } if ( $res === false ) { - print 'Error: ' . $mcc->error_string() . "\n"; + #print 'Error: ' . $mcc->error_string() . "\n"; + print "MemCached error\n"; } elseif ( is_string( $res ) ) { print "$res\n"; } else { @@ -35,13 +36,15 @@ do { $value = implode( " ", $args ); } if ( !$mcc->set( $key, $value, 0 ) ) { - print 'Error: ' . $mcc->error_string() . "\n"; + #print 'Error: ' . $mcc->error_string() . "\n"; + print "MemCached error\n"; } break; case "delete": $key = implode( " ", $args ); if ( !$mcc->delete( $key ) ) { - print 'Error: ' . $mcc->error_string() . "\n"; + #print 'Error: ' . $mcc->error_string() . "\n"; + print "MemCached error\n"; } break; case "quit": @@ -61,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; - } -} - - - ?> |