X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmcc.php;h=784ba0ea357496bee9c3d0118a0331561587e40a;hb=9964ca1a390c446397dcd466916ffed356cdc3c9;hp=7b7b761445264b834f7ed7192a954b8ed4051171;hpb=417e346059bac2c1a8f1fc1e2aad4dff2a6afd41;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mcc.php b/maintenance/mcc.php index 7b7b761445..784ba0ea35 100644 --- a/maintenance/mcc.php +++ b/maintenance/mcc.php @@ -22,11 +22,12 @@ * @ingroup Maintenance */ -/** */ +$optionsWithArgs = [ 'cache' ]; +$optionsWithoutArgs = [ + 'debug', 'help' +]; require_once __DIR__ . '/commandLine.inc'; -$options = getopt( '', array( 'debug', 'help', 'cache:' ) ); - $debug = isset( $options['debug'] ); $help = isset( $options['help'] ); $cache = isset( $options['cache'] ) ? $options['cache'] : null; @@ -35,10 +36,10 @@ if ( $help ) { mccShowUsage(); exit( 0 ); } -$mcc = new MWMemcached( array( +$mcc = new MemcachedClient( [ 'persistent' => true, 'debug' => $debug, -) ); +] ); if ( $cache ) { if ( !isset( $wgObjectCaches[$cache] ) ) { @@ -81,7 +82,7 @@ EOF; function mccGetHelp( $command ) { $output = ''; - $commandList = array( + $commandList = [ 'get' => 'grabs something', 'getsock' => 'lists sockets', 'set' => 'changes something', @@ -92,7 +93,7 @@ function mccGetHelp( $command ) { 'exit' => 'exit mcc', 'quit' => 'exit mcc', 'help' => 'help about a command', - ); + ]; if ( !$command ) { $command = 'fullhelp'; }