From b1012227978e11efc440cf4685ae1ebd023ee562 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 17 Jan 2010 15:35:14 +0000 Subject: [PATCH] Avoid r60976 breakage of unexpected line breaks inside maybeHelp --- maintenance/Maintenance.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 202963f648..14602568e3 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -572,22 +572,23 @@ abstract class Maintenance { ksort( $this->mParams ); if( $this->hasOption( 'help' ) || $force ) { $this->mQuiet = false; + if( $this->mDescription ) { $this->output( "\n" . $this->mDescription . "\n" ); } - $this->output( "\nUsage: php " . $this->mSelf ); + $output = "\nUsage: php " . $this->mSelf; if( $this->mParams ) { - $this->output( " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]" ); + $output .= " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]"; } if( $this->mArgList ) { - $this->output( " <" ); + $output .= " <"; foreach( $this->mArgList as $k => $arg ) { - $this->output( $arg['name'] . ">" ); + $output .= $arg['name'] . ">"; if( $k < count( $this->mArgList ) - 1 ) - $this->output( " <" ); + $output .= " <"; } } - $this->output( "\n" ); + $this->output( "$output\n" ); foreach( $this->mParams as $par => $info ) { $this->output( "\t$par : " . $info['desc'] . "\n" ); } -- 2.20.1