X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcommandLine.inc;h=206e04677b4a46cab494cb3d42d2caeb565e8b5e;hb=c16f2ef0853f8cdc344ed2a89a5d0a27ef0e3e63;hp=88776f4f41b480943288523c90048acde038c2bf;hpb=5c115a77890ce370d04eafd89005a028b9de8a40;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 88776f4f41..206e04677b 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -25,20 +25,27 @@ require_once __DIR__ . '/Maintenance.php'; // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix global $optionsWithArgs; +global $optionsWithoutArgs; // @codingStandardsIgnoreEnd if ( !isset( $optionsWithArgs ) ) { - $optionsWithArgs = array(); + $optionsWithArgs = []; +} +if ( !isset( $optionsWithoutArgs ) ) { + $optionsWithoutArgs = []; } class CommandLineInc extends Maintenance { public function __construct() { // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix - global $optionsWithArgs; + global $optionsWithArgs, $optionsWithoutArgs; // @codingStandardsIgnoreEnd parent::__construct(); foreach ( $optionsWithArgs as $name ) { $this->addOption( $name, '', false, true ); } + foreach ( $optionsWithoutArgs as $name ) { + $this->addOption( $name, '', false, false ); + } } /** @@ -63,4 +70,3 @@ class CommandLineInc extends Maintenance { $maintClass = 'CommandLineInc'; require RUN_MAINTENANCE_IF_MAIN; -