From: Alexandre Emsenhuber Date: Thu, 24 Sep 2009 21:41:17 +0000 (+0000) Subject: Re-implementing Maintenance::maybeHelp() in CommandLineInc to not show Maintenance... X-Git-Tag: 1.31.0-rc.0~39540 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=9a81cbd40a7f4d87985c49646b5bc35a3f382d1c;p=lhc%2Fweb%2Fwiklou.git Re-implementing Maintenance::maybeHelp() in CommandLineInc to not show Maintenance's help when passing --help (previous method was not working correctly) --- diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 6ed7b2e5b3..625161a98a 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -16,9 +16,15 @@ class CommandLineInc extends Maintenance { foreach ( $optionsWithArgs as $name ) { $this->addOption( $name, '', false, true ); } + } - # No help, it would just be misleading since it misses custom options - unset( $this->mParams['help'] ); + /** + * No help, it would just be misleading since it misses custom options + */ + protected function maybeHelp( $force = false ) { + if ( !$force ) + return; + parent::maybeHelp( true ); } public function execute() {