r85178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85177‎ | r85178 | r85179 >
Date:07:34, 2 April 2011
Author:maxsem
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/installer/CliInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/CliInstaller.php
@@ -112,13 +112,12 @@
113113 }
114114
115115 public function startStage( $step ) {
116 - $this->showMessage( wfMsg( "config-install-$step" ) .
117 - wfMsg( 'ellipsis' ) . wfMsg( 'word-separator' ) );
 116+ $this->showMessage( "config-install-$step" );
118117 }
119118
120119 public function endStage( $step, $status ) {
121120 $this->showStatusMessage( $status );
122 - $this->showMessage( wfMsg( 'config-install-step-done' ) . "\n" );
 121+ $this->showMessage( 'config-install-step-done' );
123122 }
124123
125124 public function showMessage( $msg /*, ... */ ) {
@@ -126,10 +125,6 @@
127126 array_shift( $params );
128127
129128 $text = wfMsgExt( $msg, array( 'parseinline' ), $params );
130 - /* parseinline has the nasty side-effect of putting encoded
131 - * angle brackets, around the message.
132 - */
133 - $text = preg_replace( '/(^<|>$)/', '', $text );
134129
135130 $text = preg_replace( '/<a href="(.*?)".*?>(.*?)<\/a>/', '$2 &lt;$1&gt;', $text );
136131 echo html_entity_decode( strip_tags( $text ), ENT_QUOTES ) . "\n";
@@ -141,9 +136,8 @@
142137 $status->getErrorsArray() );
143138
144139 if ( count( $warnings ) !== 0 ) {
145 - foreach ( $status->getWikiTextArray( $warnings ) as $w ) {
146 - $this->showMessage( $w . wfMsg( 'ellipsis' ) .
147 - wfMsg( 'word-separator' ) );
 140+ foreach ( $warnings as $w ) {
 141+ call_user_func_array( array( $this, 'showMessage' ), $w );
148142 }
149143 }
150144

Sign-offs

UserFlagDate
Nikerabbitinspected08:13, 2 April 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r85435MFT: r84431, r84464, r84543, r84553, r84573, r84574, r84577, r84729, r84765, ...demon14:00, 5 April 2011

Status & tagging log