r61169 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61168‎ | r61169 | r61170 >
Date:15:35, 17 January 2010
Author:platonides
Status:ok
Tags:
Comment:
Avoid r60976 breakage of unexpected line breaks inside maybeHelp
Modified paths:
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/Maintenance.php
@@ -572,22 +572,23 @@
573573 ksort( $this->mParams );
574574 if( $this->hasOption( 'help' ) || $force ) {
575575 $this->mQuiet = false;
 576+
576577 if( $this->mDescription ) {
577578 $this->output( "\n" . $this->mDescription . "\n" );
578579 }
579 - $this->output( "\nUsage: php " . $this->mSelf );
 580+ $output = "\nUsage: php " . $this->mSelf;
580581 if( $this->mParams ) {
581 - $this->output( " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]" );
 582+ $output .= " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]";
582583 }
583584 if( $this->mArgList ) {
584 - $this->output( " <" );
 585+ $output .= " <";
585586 foreach( $this->mArgList as $k => $arg ) {
586 - $this->output( $arg['name'] . ">" );
 587+ $output .= $arg['name'] . ">";
587588 if( $k < count( $this->mArgList ) - 1 )
588 - $this->output( " <" );
 589+ $output .= " <";
589590 }
590591 }
591 - $this->output( "\n" );
 592+ $this->output( "$output\n" );
592593 foreach( $this->mParams as $par => $info ) {
593594 $this->output( "\t$par : " . $info['desc'] . "\n" );
594595 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60976Channeled output support for maintenance scripts....nikerabbit19:06, 12 January 2010

Status & tagging log