X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmcc.php;h=784ba0ea357496bee9c3d0118a0331561587e40a;hb=a166e509431ab2f002e3ae68ac3b01a4261a9b16;hp=6b8487fb5cb589f4f6364a4078c7e6a18be18485;hpb=abb7c6792fab5e9a6e0c088dd820fd3d74c13059;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mcc.php b/maintenance/mcc.php index 6b8487fb5c..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 MemcachedClient( 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'; }