From: Max Semenik Date: Sat, 2 Apr 2011 07:34:07 +0000 (+0000) Subject: Cleaned up the mess of message text being passed instead of keys to wfMsg() and frien... X-Git-Tag: 1.31.0-rc.0~31083 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=82b0358137d75b1ee32b264c085aada9e90a7b68;p=lhc%2Fweb%2Fwiklou.git Cleaned up the mess of message text being passed instead of keys to wfMsg() and friends by CLI installer. No surprise we had to remove angle brackets from the resulting output --- diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index c6b78d9fe2..710823aae7 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -112,13 +112,12 @@ class CliInstaller extends Installer { } public function startStage( $step ) { - $this->showMessage( wfMsg( "config-install-$step" ) . - wfMsg( 'ellipsis' ) . wfMsg( 'word-separator' ) ); + $this->showMessage( "config-install-$step" ); } public function endStage( $step, $status ) { $this->showStatusMessage( $status ); - $this->showMessage( wfMsg( 'config-install-step-done' ) . "\n" ); + $this->showMessage( 'config-install-step-done' ); } public function showMessage( $msg /*, ... */ ) { @@ -126,10 +125,6 @@ class CliInstaller extends Installer { array_shift( $params ); $text = wfMsgExt( $msg, array( 'parseinline' ), $params ); - /* parseinline has the nasty side-effect of putting encoded - * angle brackets, around the message. - */ - $text = preg_replace( '/(^<|>$)/', '', $text ); $text = preg_replace( '/(.*?)<\/a>/', '$2 <$1>', $text ); echo html_entity_decode( strip_tags( $text ), ENT_QUOTES ) . "\n"; @@ -141,9 +136,8 @@ class CliInstaller extends Installer { $status->getErrorsArray() ); if ( count( $warnings ) !== 0 ) { - foreach ( $status->getWikiTextArray( $warnings ) as $w ) { - $this->showMessage( $w . wfMsg( 'ellipsis' ) . - wfMsg( 'word-separator' ) ); + foreach ( $warnings as $w ) { + call_user_func_array( array( $this, 'showMessage' ), $w ); } }