dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Clarify what $params is for ApiBase methods to get Title/WikiPage"
[lhc/web/wiklou.git]
/
maintenance
/
commandLine.inc
diff --git
a/maintenance/commandLine.inc
b/maintenance/commandLine.inc
index
be07142
..
206e046
100644
(file)
--- a/
maintenance/commandLine.inc
+++ b/
maintenance/commandLine.inc
@@
-23,22
+23,34
@@
require_once __DIR__ . '/Maintenance.php';
require_once __DIR__ . '/Maintenance.php';
+// @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
global $optionsWithArgs;
global $optionsWithArgs;
+global $optionsWithoutArgs;
+// @codingStandardsIgnoreEnd
if ( !isset( $optionsWithArgs ) ) {
if ( !isset( $optionsWithArgs ) ) {
- $optionsWithArgs = array();
+ $optionsWithArgs = [];
+}
+if ( !isset( $optionsWithoutArgs ) ) {
+ $optionsWithoutArgs = [];
}
class CommandLineInc extends Maintenance {
public function __construct() {
}
class CommandLineInc extends Maintenance {
public function __construct() {
- global $optionsWithArgs;
+ // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
+ global $optionsWithArgs, $optionsWithoutArgs;
+ // @codingStandardsIgnoreEnd
parent::__construct();
foreach ( $optionsWithArgs as $name ) {
$this->addOption( $name, '', false, true );
}
parent::__construct();
foreach ( $optionsWithArgs as $name ) {
$this->addOption( $name, '', false, true );
}
+ foreach ( $optionsWithoutArgs as $name ) {
+ $this->addOption( $name, '', false, false );
+ }
}
/**
* No help, it would just be misleading since it misses custom options
}
/**
* No help, it would just be misleading since it misses custom options
+ * @param bool $force
*/
protected function maybeHelp( $force = false ) {
if ( !$force ) {
*/
protected function maybeHelp( $force = false ) {
if ( !$force ) {
@@
-48,7
+60,9
@@
class CommandLineInc extends Maintenance {
}
public function execute() {
}
public function execute() {
+ // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
global $args, $options;
global $args, $options;
+ // @codingStandardsIgnoreEnd
$args = $this->mArgs;
$options = $this->mOptions;
}
$args = $this->mArgs;
$options = $this->mOptions;
}
@@
-56,4
+70,3
@@
class CommandLineInc extends Maintenance {
$maintClass = 'CommandLineInc';
require RUN_MAINTENANCE_IF_MAIN;
$maintClass = 'CommandLineInc';
require RUN_MAINTENANCE_IF_MAIN;
-