r56898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56897‎ | r56898 | r56899 >
Date:21:41, 24 September 2009
Author:ialex
Status:ok
Tags:
Comment:
Re-implementing Maintenance::maybeHelp() in CommandLineInc to not show Maintenance's help when passing --help (previous method was not working correctly)
Modified paths:
  • /trunk/phase3/maintenance/commandLine.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/commandLine.inc
@@ -16,9 +16,15 @@
1717 foreach ( $optionsWithArgs as $name ) {
1818 $this->addOption( $name, '', false, true );
1919 }
 20+ }
2021
21 - # No help, it would just be misleading since it misses custom options
22 - unset( $this->mParams['help'] );
 22+ /**
 23+ * No help, it would just be misleading since it misses custom options
 24+ */
 25+ protected function maybeHelp( $force = false ) {
 26+ if ( !$force )
 27+ return;
 28+ parent::maybeHelp( true );
2329 }
2430
2531 public function execute() {

Status & tagging log