Index: trunk/extensions/Configure/pager/PagerFiles.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | function getBody() { |
29 | 29 | $versions = $this->mHandler->getArchiveVersions( $this->getVersionOptions() ); |
30 | 30 | if ( empty( $versions ) ) { |
31 | | - return wfMsgExt( 'configure-no-old', array( 'parse' ) ); |
| 31 | + return wfMessage( 'configure-no-old' )->parseAsBlock(); |
32 | 32 | } |
33 | 33 | |
34 | 34 | $text = "<ul>\n"; |
Index: trunk/extensions/Configure/specials/SpecialViewConfig.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | * Build links to old version of the configuration |
86 | 86 | */ |
87 | 87 | protected function buildOldVersionSelect() { |
88 | | - global $wgConf, $wgLang, $wgUser, $wgRequest, $wgScript; |
| 88 | + global $wgConf, $wgUser, $wgRequest, $wgScript; |
89 | 89 | |
90 | 90 | $self = $this->getTitle(); |
91 | 91 | $pager = $wgConf->getPager(); |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | 'allowedExtensionsAll' => $wgUser->isAllowed( 'extensions-interwiki' ), |
106 | 106 | 'self' => $self, |
107 | 107 | 'skin' => $wgUser->getSkin(), |
108 | | - 'editMsg' => wfMsg( 'edit' ) . wfMsg( 'colon-separator' ), |
| 108 | + 'editMsg' => wfMessage( 'edit' )->text() . wfMessage( 'colon-separator' )->text(), |
109 | 109 | ); |
110 | 110 | |
111 | 111 | if ( $formatConf['allowedConfig'] ) |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | |
117 | 117 | $this->formatConf = $formatConf; |
118 | 118 | |
119 | | - $text = wfMsgExt( 'configure-old-versions', array( 'parse' ) ); |
| 119 | + $text = wfMessage( 'configure-old-versions' )->parseAsBlock(); |
120 | 120 | if( $this->isUserAllowedInterwiki() ) |
121 | 121 | $text .= $this->getWikiSelectForm(); |
122 | 122 | $text .= $pager->getNavigationBar(); |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | $hasSelf = in_array( $this->mWiki, $wikis ); |
143 | 143 | |
144 | 144 | extract( $this->formatConf ); |
145 | | - $datime = $wgLang->timeAndDate( $ts ); |
| 145 | + $datime = $wgLang->timeanddate( $ts ); |
146 | 146 | $date = $wgLang->date( $ts ); |
147 | 147 | $time = $wgLang->time( $ts ); |
148 | 148 | |
— | — | @@ -165,14 +165,14 @@ |
166 | 166 | $actions = array(); |
167 | 167 | $view = ''; |
168 | 168 | if ( $hasSelf ) |
169 | | - $view .= $skin->makeKnownLinkObj( $self, wfMsgHtml( 'configure-view' ), "version=$ts" ); |
| 169 | + $view .= $skin->linkKnown( $self, wfMessage( 'configure-view' )->escaped(), array(), array( 'version' => $ts ) ); |
170 | 170 | elseif( $allowedAll ) |
171 | | - $view .= wfMsgHtml( 'configure-view' ); |
| 171 | + $view .= wfMessage( 'configure-view' )->escaped(); |
172 | 172 | |
173 | 173 | if ( $allowedAll ) { |
174 | 174 | $viewWikis = array(); |
175 | 175 | foreach ( $wikis as $wiki ) { |
176 | | - $viewWikis[] = $skin->makeKnownLinkObj( $self, htmlspecialchars( $wiki ), "version={$ts}&wiki={$wiki}" ); |
| 176 | + $viewWikis[] = $skin->linkKnown( $self, htmlspecialchars( $wiki ), array(), array( 'version' => $ts, 'wiki' => $wiki ) ); |
177 | 177 | } |
178 | 178 | $view .= ' (' . $wgLang->commaList( $viewWikis ) . ')'; |
179 | 179 | } |
— | — | @@ -183,16 +183,16 @@ |
184 | 184 | $editDone = false; |
185 | 185 | if ( $allowedConfig ) { |
186 | 186 | if ( $hasSelf ) |
187 | | - $editCore = $editMsg . $skin->makeKnownLinkObj( $configTitle, wfMsgHtml( 'configure-edit-core' ), "version=$ts" ); |
| 187 | + $editCore = $editMsg . $skin->linkKnown( $configTitle, wfMessage( 'configure-edit-core' )->escaped(), array(), array( 'version' => $ts ) ); |
188 | 188 | elseif( $allowedConfigAll ) |
189 | | - $editCore = $editMsg . wfMsgHtml( 'configure-edit-core' ); |
| 189 | + $editCore = $editMsg . wfMessage( 'configure-edit-core' )->escaped(); |
190 | 190 | else |
191 | 191 | $editCore = $editMsg; |
192 | 192 | |
193 | 193 | if ( $allowedConfigAll ) { |
194 | 194 | $viewWikis = array(); |
195 | 195 | foreach ( $wikis as $wiki ) { |
196 | | - $viewWikis[] = $skin->makeKnownLinkObj( $configTitle, htmlspecialchars( $wiki ), "version={$ts}&wiki={$wiki}" ); |
| 196 | + $viewWikis[] = $skin->linkKnown( $configTitle, htmlspecialchars( $wiki ), array(), array( 'version' => $ts, 'wiki' => $wiki ) ); |
197 | 197 | } |
198 | 198 | $editCore .= ' (' . $wgLang->commaList( $viewWikis ) . ')'; |
199 | 199 | } |
— | — | @@ -203,14 +203,14 @@ |
204 | 204 | if ( !$allowedConfig ) |
205 | 205 | $editExt .= $editMsg; |
206 | 206 | if ( $hasSelf ) |
207 | | - $editExt .= $skin->makeKnownLinkObj( $extTitle, wfMsgHtml( 'configure-edit-ext' ), "version=$ts" ); |
| 207 | + $editExt .= $skin->linkKnown( $extTitle, wfMessage( 'configure-edit-ext' )->escaped(), array(), array( 'version' => $ts ) ); |
208 | 208 | elseif( $allowedExtensionsAll ) |
209 | | - $editExt .= wfMsgHtml( 'configure-edit-ext' ); |
| 209 | + $editExt .= wfMessage( 'configure-edit-ext' )->escaped(); |
210 | 210 | |
211 | 211 | if ( $allowedExtensionsAll ) { |
212 | 212 | $viewWikis = array(); |
213 | 213 | foreach ( $wikis as $wiki ) { |
214 | | - $viewWikis[] = $skin->makeKnownLinkObj( $extTitle, htmlspecialchars( $wiki ), "version={$ts}&wiki={$wiki}" ); |
| 214 | + $viewWikis[] = $skin->linkKnown( $extTitle, htmlspecialchars( $wiki ), array(), array( 'version' => $ts, 'wiki' => $wiki ) ); |
215 | 215 | } |
216 | 216 | $editExt .= ' (' . $wgLang->commaList( $viewWikis ) . ')'; |
217 | 217 | } |
— | — | @@ -227,7 +227,8 @@ |
228 | 228 | array( 'type' => 'radio', 'name' => 'version', 'value' => $ts ), |
229 | 229 | $versionCheck ) ); |
230 | 230 | |
231 | | - $actions[] = $skin->link( $this->getTitle(), wfMsgHtml( 'configure-viewconfig-default-diff' ), array(), array( 'version' => $ts, 'diff' => 'default' ) ); |
| 231 | + $actions[] = $skin->link( $this->getTitle(), wfMessage( 'configure-viewconfig-default-diff' )->escaped(), |
| 232 | + array(), array( 'version' => $ts, 'diff' => 'default' ) ); |
232 | 233 | } else { |
233 | 234 | $buttons = ''; |
234 | 235 | } |
— | — | @@ -236,9 +237,9 @@ |
237 | 238 | |
238 | 239 | $action = $wgLang->commaList( $actions ); |
239 | 240 | |
240 | | - // That's a damn hack because some parmaters must replaced before and some after... |
241 | | - $msg = wfMsgExt( 'configure-viewconfig-line', array( 'parseinline' ), array( '$1', $datime, '$2', '$3', '$4', $date, $time, $username ) ); |
242 | | - return Xml::tags( 'li', null, wfMsgReplaceArgs( $msg, array( $buttons, $userLink, $action, $comment ) ) )."\n"; |
| 241 | + $msg = wfMessage( 'configure-viewconfig-line' )->rawParams( $buttons )->params( |
| 242 | + $datime )->rawParams( $userLink, $action, $comment )->params( $date, $time, $username )->parse(); |
| 243 | + return Xml::tags( 'li', null, $msg )."\n"; |
243 | 244 | } |
244 | 245 | |
245 | 246 | /** |
— | — | @@ -248,14 +249,14 @@ |
249 | 250 | global $wgConfigureWikis, $wgScript, $wgRequest; |
250 | 251 | if ( $wgConfigureWikis === false || !$this->isUserAllowedInterwiki() ) |
251 | 252 | return ''; |
252 | | - $form = '<fieldset><legend>' . wfMsgHtml( 'configure-select-wiki' ) . '</legend>'; |
253 | | - $form .= wfMsgExt( 'configure-select-wiki-view-desc', array( 'parse' ) ); |
| 253 | + $form = '<fieldset><legend>' . wfMessage( 'configure-select-wiki' )->escaped() . '</legend>'; |
| 254 | + $form .= wfMessage( 'configure-select-wiki-view-desc' )->parseAsBlock(); |
254 | 255 | $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); |
255 | 256 | $form .= Html::Hidden( 'title', $this->getTitle()->getPrefixedDBkey() ); |
256 | 257 | $all = ( $wgRequest->getVal( 'view', 'all' ) == 'all' ); |
257 | | - $form .= Xml::radioLabel( wfMsg( 'configure-select-wiki-view-all' ), 'view', 'all', 'wiki-all', $all ); |
| 258 | + $form .= Xml::radioLabel( wfMessage( 'configure-select-wiki-view-all' )->text(), 'view', 'all', 'wiki-all', $all ); |
258 | 259 | $form .= "<br />\n"; |
259 | | - $form .= Xml::radioLabel( wfMsg( 'configure-select-wiki-view-specific' ), 'view', 'specific', 'wiki-specific', !$all ) . ' '; |
| 260 | + $form .= Xml::radioLabel( wfMessage( 'configure-select-wiki-view-specific' )->text(), 'view', 'specific', 'wiki-specific', !$all ) . ' '; |
260 | 261 | |
261 | 262 | if ( is_array( $wgConfigureWikis ) ) { |
262 | 263 | $selector = new XmlSelect( 'wiki', 'wiki', $this->mWiki ); |
— | — | @@ -267,7 +268,7 @@ |
268 | 269 | $form .= Xml::input( 'wiki', false, $this->mWiki )."<br />"; |
269 | 270 | } |
270 | 271 | |
271 | | - $form .= Xml::submitButton( wfMsg( 'configure-select-wiki-submit' ) ); |
| 272 | + $form .= Xml::submitButton( wfMessage( 'configure-select-wiki-submit' )->text() ); |
272 | 273 | $form .= '</form></fieldset>'; |
273 | 274 | return $form; |
274 | 275 | } |
— | — | @@ -276,11 +277,11 @@ |
277 | 278 | * Taken from PageHistory.php |
278 | 279 | */ |
279 | 280 | protected function getButton() { |
280 | | - return Xml::submitButton( wfMsg( 'compareselectedversions' ), |
| 281 | + return Xml::submitButton( wfMessage( 'compareselectedversions' )->text(), |
281 | 282 | array( |
282 | 283 | 'class' => 'historysubmit', |
283 | | - 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ), |
284 | | - 'title' => wfMsg( 'tooltip-compareselectedversions' ), |
| 284 | + 'accesskey' => wfMessage( 'accesskey-compareselectedversions' )->text(), |
| 285 | + 'title' => wfMessage( 'tooltip-compareselectedversions' )->text(), |
285 | 286 | ) |
286 | 287 | ); |
287 | 288 | } |
Index: trunk/extensions/Configure/specials/ConfigurationPage.php |
— | — | @@ -287,13 +287,13 @@ |
288 | 288 | protected function showResult( $result ) { |
289 | 289 | global $wgOut, $wgUser; |
290 | 290 | $ok = $result == 'success'; |
291 | | - $msg = wfMsgNoTrans( $ok ? 'configure-saved' : 'configure-error' ); |
| 291 | + $msg = $ok ? 'configure-saved' : 'configure-error'; |
292 | 292 | $class = $ok ? 'successbox' : 'errorbox'; |
293 | 293 | |
294 | | - $wgOut->addWikiText( Html::rawElement( 'div', array( 'class' => $class ), "<strong>$msg</strong>" ) ); |
| 294 | + $wgOut->wrapWikiMsg( Html::rawElement( 'div', array( 'class' => $class ), '$1' ), $msg ); |
295 | 295 | |
296 | 296 | $sk = $wgUser->getSkin(); |
297 | | - $linkText = wfMsgExt( 'configure-backlink', 'parseinline' ); |
| 297 | + $linkText = wfMessage( 'configure-backlink' )->parse(); |
298 | 298 | $wgOut->addHTML( Html::rawElement( 'p', array( 'style' => 'clear:both;' ), $sk->link( $this->getTitle(), $linkText ) ) ); |
299 | 299 | } |
300 | 300 | |
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | global $wgOut, $wgLang; |
313 | 313 | |
314 | 314 | $wgOut->addWikiMsg( 'configure-edit-old', |
315 | | - $wgLang->timeAndDate( $version ), |
| 315 | + $wgLang->timeanddate( $version ), |
316 | 316 | $wgLang->date( $version ), |
317 | 317 | $wgLang->time( $version ) |
318 | 318 | ); |
— | — | @@ -380,16 +380,16 @@ |
381 | 381 | foreach ( $versions as $data ) { |
382 | 382 | $ts = $data['timestamp']; |
383 | 383 | $count++; |
384 | | - $datetime = wfMsgExt( 'configure-old-summary-datetime', array( 'parsemag', 'escape' ), |
385 | | - $wgLang->timeAndDate( $ts ), |
| 384 | + $datetime = wfMessage( 'configure-old-summary-datetime', |
| 385 | + $wgLang->timeanddate( $ts ), |
386 | 386 | $wgLang->date( $ts ), |
387 | 387 | $wgLang->time( $ts ) |
388 | | - ); |
| 388 | + )->escaped(); |
389 | 389 | $link = $skin->linkKnown( $title, $datetime, array(), array( 'version' => $ts ) ); |
390 | 390 | $diffLink = ''; |
391 | 391 | if ( $prev ) |
392 | 392 | $diffLink = '(' . $skin->linkKnown( SpecialPage::getTitleFor( 'ViewConfig' ), |
393 | | - wfMsgHtml( 'configure-old-changes' ), array(), array( 'version' => $ts, 'diff' => $prev ) ) . ')'; |
| 393 | + wfMessage( 'configure-old-changes' )->escaped(), array(), array( 'version' => $ts, 'diff' => $prev ) ) . ')'; |
394 | 394 | |
395 | 395 | ## Make user link... |
396 | 396 | $userLink = ''; |
— | — | @@ -410,8 +410,7 @@ |
411 | 411 | |
412 | 412 | $comment = $data['reason'] ? $skin->commentBlock( $data['reason'] ) : ''; |
413 | 413 | |
414 | | - $text = wfMsgExt( 'configure-old-summary', array( 'parseinline' ), array( '$1', '$2', '$3', '$4', $username ) ); |
415 | | - $text = wfMsgReplaceArgs( $text, array( $link, $userLink, $diffLink, $comment ) ); |
| 414 | + $text = wfMessage( 'configure-old-summary' )->rawParams( $link, $userLink, $diffLink, $comment )->params( $username )->parse(); |
416 | 415 | |
417 | 416 | $prev = $ts; |
418 | 417 | |
— | — | @@ -423,18 +422,18 @@ |
424 | 423 | ## Take out the first ten... |
425 | 424 | $links = array_slice( $links, 0, 10 ); |
426 | 425 | |
427 | | - $text = Html::element( 'legend', null, wfMsg( 'configure-old' ) ); |
| 426 | + $text = Html::element( 'legend', null, wfMessage( 'configure-old' )->text() ); |
428 | 427 | if ( !count( $links ) ) { |
429 | | - $text .= wfMsgExt( 'configure-no-old', array( 'parse' ) ); |
| 428 | + $text .= wfMessage( 'configure-no-old' )->parseAsBlock(); |
430 | 429 | } else { |
431 | | - $text .= wfMsgExt( 'configure-old-versions', array( 'parse' ) ); |
| 430 | + $text .= wfMessage( 'configure-old-versions' )->parseAsBlock(); |
432 | 431 | $text .= "<ul>\n<li>"; |
433 | 432 | $text .= implode( "</li>\n<li>", $links ); |
434 | 433 | $text .= "</li>\n</ul>\n"; |
435 | 434 | } |
436 | 435 | $link = SpecialPage::getTitleFor( 'ViewConfig' ); |
437 | | - $text .= Html::rawElement( 'p', null, $skin->link( $link, wfMsgHtml( 'configure-view-all-versions' ), array(), array(), array( 'known' ) ) ); |
438 | | - $text .= Html::rawElement( 'p', null, $skin->link( $link, wfMsgHtml( 'configure-view-default' ), array(), array( 'version' => 'default' ), array( 'known' ) ) ); |
| 436 | + $text .= Html::rawElement( 'p', null, $skin->linkKnown( $link, wfMessage( 'configure-view-all-versions' )->escaped() ) ); |
| 437 | + $text .= Html::rawElement( 'p', null, $skin->linkKnown( $link, wfMessage( 'configure-view-default' )->escaped(), array(), array( 'version' => 'default' ) ) ); |
439 | 438 | |
440 | 439 | return Html::rawElement( 'fieldset', null, $text ); |
441 | 440 | } |
— | — | @@ -446,8 +445,8 @@ |
447 | 446 | global $wgConfigureWikis, $wgScript; |
448 | 447 | if ( $wgConfigureWikis === false || !$this->isUserAllowedInterwiki() ) |
449 | 448 | return ''; |
450 | | - $form = Html::element( 'legend', null, wfMsg( 'configure-select-wiki' ) ); |
451 | | - $form .= wfMsgExt( 'configure-select-wiki-desc', array( 'parse' ) ); |
| 449 | + $form = Html::element( 'legend', null, wfMessage( 'configure-select-wiki' )->text() ); |
| 450 | + $form .= wfMessage( 'configure-select-wiki-desc' )->parseAsBlock(); |
452 | 451 | $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); |
453 | 452 | $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ); |
454 | 453 | if ( is_array( $wgConfigureWikis ) ) { |
— | — | @@ -459,7 +458,7 @@ |
460 | 459 | } else { |
461 | 460 | $form .= Html::input( 'wiki', $this->mWiki, 'text' ) . ' '; |
462 | 461 | } |
463 | | - $form .= Html::input( null, wfMsg( 'configure-select-wiki-submit' ), 'submit' ); |
| 462 | + $form .= Html::input( null, wfMessage( 'configure-select-wiki-submit' )->text(), 'submit' ); |
464 | 463 | $form .= Html::closeElement( 'form' ); |
465 | 464 | return Html::rawElement( 'fieldset', null, $form ); |
466 | 465 | } |
— | — | @@ -844,7 +843,7 @@ |
845 | 844 | protected function showForm() { |
846 | 845 | global $wgOut, $wgUser, $wgRequest; |
847 | 846 | |
848 | | - $action = $this->getTitle()->escapeLocalURL(); |
| 847 | + $action = $this->getTitle()->getLocalURL(); |
849 | 848 | |
850 | 849 | $reason = $wgRequest->getText( 'wpReason' ); |
851 | 850 | |
— | — | @@ -860,12 +859,12 @@ |
861 | 860 | Html::openElement( 'div', array( 'id' => 'configure' ) ) . "\n" . |
862 | 861 | $this->buildAllSettings() . "\n" . |
863 | 862 | ( $this->mCanEdit ? |
864 | | - wfMsgExt( 'configure-form-reason', 'parseinline' ) . ' ' . Html::input( 'wpReason', $reason, 'text', array( 'size' => 45 ) ) . "\n" . |
| 863 | + wfMessage( 'configure-form-reason' )->text() . ' ' . Html::input( 'wpReason', $reason, 'text', array( 'size' => 45 ) ) . "\n" . |
865 | 864 | Html::openElement( 'div', array( 'id' => 'prefsubmit' ) ) . "\n" . |
866 | 865 | Html::openElement( 'div', array() ) . "\n" . |
867 | 866 | Html::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n" . |
868 | | - Html::input( 'wpSave', wfMsg( 'configure-btn-save' ), 'submit', array( 'class' => 'btnSavePrefs' ) ) . "\n" . |
869 | | - Html::input( 'wpPreview', wfMsg( 'showdiff' ), 'submit' ) . "\n" . |
| 867 | + Html::input( 'wpSave', wfMessage( 'configure-btn-save' )->text(), 'submit', array( 'class' => 'btnSavePrefs' ) ) . "\n" . |
| 868 | + Html::input( 'wpPreview', wfMessage( 'showdiff' )->text(), 'submit' ) . "\n" . |
870 | 869 | Html::closeElement( 'div' ) . "\n" . |
871 | 870 | Html::closeElement( 'div' ) . "\n" . |
872 | 871 | Html::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n" . |
— | — | @@ -880,9 +879,9 @@ |
881 | 880 | |
882 | 881 | /** Show a hidden-by-default search form */ |
883 | 882 | protected function buildSearchForm() { |
884 | | - $input = wfMsgExt( 'configure-js-search-prompt', 'parseinline' ) . wfMsgExt( 'word-separator', array( 'escapenoentities' ) ) . |
885 | | - Html::element( 'input', array( 'id' => 'configure-search-input', 'size' => 45 ) ); |
886 | | - $form = Html::element( 'legend', null, wfMsg( 'configure-js-search-legend' ) ) . Html::rawElement( 'p', null, $input ) . "\n" . |
| 883 | + $input = wfMessage( 'configure-js-search-prompt' )->parse() . wfMessage( 'word-separator' )->escaped() . |
| 884 | + Html::element( 'input', array( 'id' => 'configure-search-input', 'size' => 45 ), null ); |
| 885 | + $form = Html::element( 'legend', null, wfMessage( 'configure-js-search-legend' )->text() ) . Html::rawElement( 'p', null, $input ) . "\n" . |
887 | 886 | Html::openElement( 'ul', array( 'id' => 'configure-search-results' ) ) . Html::closeElement( 'ul' ); |
888 | 887 | $form = Html::rawElement( 'fieldset', array( 'style' => 'display: none;', 'id' => 'configure-search-form' ), $form ); |
889 | 888 | return $form; |
— | — | @@ -904,10 +903,12 @@ |
905 | 904 | * @return String xhtml fragment |
906 | 905 | */ |
907 | 906 | protected function buildTableHeading( $msg ) { |
908 | | - $msgName = 'configure-section-' . $msg; |
909 | | - $msgVal = wfMsgExt( $msgName, array( 'parseinline' ) ); |
910 | | - if ( wfEmptyMsg( $msgName, $msgVal ) ) |
| 907 | + $msgObj = wfMessage( 'configure-section-' . $msg ); |
| 908 | + if ( $msgObj->exists() ) { |
| 909 | + $msgVal = $msgObj->parse(); |
| 910 | + } else { |
911 | 911 | $msgVal = $msg; |
| 912 | + } |
912 | 913 | return "\n<h2>" . $msgVal . "</h2>" . Html::openElement( 'table', array( 'class' => 'configure-table' ) ) . "\n"; |
913 | 914 | } |
914 | 915 | |
— | — | @@ -921,7 +922,7 @@ |
922 | 923 | protected function buildInput( $conf, $params = array() ) { |
923 | 924 | $read = isset( $params['read'] ) ? $params['read'] : $this->userCanRead( $conf ); |
924 | 925 | if ( !$read ) |
925 | | - return Html::rawElement( 'span', array( 'class' => 'disabled' ), wfMsgExt( 'configure-view-not-allowed', array( 'parseinline' ) ) ); |
| 926 | + return Html::rawElement( 'span', array( 'class' => 'disabled' ), wfMessage( 'configure-view-not-allowed' )->parse() ); |
926 | 927 | $allowed = isset( $params['edit'] ) ? $params['edit'] : $this->userCanEdit( $conf ); |
927 | 928 | $type = isset( $params['type'] ) ? $params['type'] : $this->getSettingType( $conf ); |
928 | 929 | $default = isset( $params['value'] ) ? $params['value'] : $this->getSettingValue( $conf ); |
— | — | @@ -933,7 +934,7 @@ |
934 | 935 | if ( $type == 'image-url' ) { |
935 | 936 | if ( !$allowed ) |
936 | 937 | return '<code>' . htmlspecialchars( (string)$default ) . '</code>'; |
937 | | - return wfMsgExt( 'configure-image-url-explanation', 'parseinline' ) . '<br />' . |
| 938 | + return wfMessage( 'configure-image-url-explanation' )->parse() . '<br />' . |
938 | 939 | Html::element( 'input', array( 'name' => "wp$conf", 'size' => 45, 'value' => (string)$default, |
939 | 940 | 'class' => 'image-selector', 'id' => 'image-url-textbox-' . $conf ) |
940 | 941 | ) . ' ' . |
— | — | @@ -1013,7 +1014,7 @@ |
1014 | 1015 | htmlspecialchars( ( is_array( $default ) ? implode( "\n", $default ) : $default ) ) . |
1015 | 1016 | "\n</pre>"; |
1016 | 1017 | } |
1017 | | - $text = wfMsgExt( 'configure-arrayinput-oneperline', 'parseinline' ); |
| 1018 | + $text = wfMessage( 'configure-arrayinput-oneperline' )->parse(); |
1018 | 1019 | $text .= Html::textarea( "wp{$conf}", is_array( $default ) ? implode( "\n", $default ) : '', |
1019 | 1020 | array( 'id' => "wp{$conf}", 'rows' => 8, 'style' => 'width:95%;' ) ); |
1020 | 1021 | return $text; |
— | — | @@ -1021,13 +1022,19 @@ |
1022 | 1023 | if ( $type == 'assoc' ) { |
1023 | 1024 | ## See if the key/value has a special description |
1024 | 1025 | |
1025 | | - $keydesc = wfMsgExt( "configure-setting-$conf-key", 'parseinline' ); |
1026 | | - $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' ); |
| 1026 | + $keydescmsg = wfMessage( "configure-setting-$conf-key" ); |
| 1027 | + if ( $keydescmsg->exists() ) { |
| 1028 | + $keydesc = $keydescmsg->parse(); |
| 1029 | + } else { |
| 1030 | + $keydesc = wfMessage( 'configure-desc-key' )->escaped(); |
| 1031 | + } |
1027 | 1032 | |
1028 | | - if ( wfEmptyMsg( "configure-setting-$conf-key", $keydesc ) ) |
1029 | | - $keydesc = wfMsgHtml( 'configure-desc-key' ); |
1030 | | - if ( wfEmptyMsg( "configure-setting-$conf-value", $valdesc ) ) |
1031 | | - $valdesc = wfMsgHtml( 'configure-desc-val' ); |
| 1033 | + $valdescmsg = wfMessage( "configure-setting-$conf-value" ); |
| 1034 | + if ( $valdescmsg->exists() ) { |
| 1035 | + $valdesc = $valdescmsg->parse(); |
| 1036 | + } else { |
| 1037 | + $valdesc = wfMessage( 'configure-desc-val' )->escaped(); |
| 1038 | + } |
1032 | 1039 | |
1033 | 1040 | $classes = array( 'configure-array-table', 'assoc' ); |
1034 | 1041 | |
— | — | @@ -1051,13 +1058,14 @@ |
1052 | 1059 | else |
1053 | 1060 | $text .= '<code>' . htmlspecialchars( $key ) . '</code>'; |
1054 | 1061 | $text .= Html::closeElement( 'td' ) . Html::openElement( 'td' ); |
1055 | | - if ( $allowed ) |
| 1062 | + if ( $allowed ) { |
1056 | 1063 | $text .= Html::element( 'input', array( |
1057 | 1064 | 'name' => 'wp' . $conf . "-val-{$i}", |
1058 | 1065 | 'type' => 'text', 'value' => $val, 'size' => 20 |
1059 | 1066 | ) ) . Html::element( 'br' ) . "\n"; |
1060 | | - else |
| 1067 | + } else { |
1061 | 1068 | $text .= '<code>' . htmlspecialchars( $val ) . '</code>'; |
| 1069 | + } |
1062 | 1070 | $text .= Html::closeElement( 'td' ) . Html::closeElement( 'tr' ); |
1063 | 1071 | $i++; |
1064 | 1072 | } |
— | — | @@ -1085,13 +1093,19 @@ |
1086 | 1094 | return $text; |
1087 | 1095 | } |
1088 | 1096 | if ( $type == 'rate-limits' ) { ## Some of this is stolen from assoc, since it's an assoc with an assoc. |
1089 | | - $keydesc = wfMsgExt( "configure-setting-$conf-key", 'parseinline' ); |
1090 | | - $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' ); |
| 1097 | + $keydescmsg = wfMessage( "configure-setting-$conf-key" ); |
| 1098 | + if ( $keydescmsg->exists() ) { |
| 1099 | + $keydesc = $keydescmsg->parse(); |
| 1100 | + } else { |
| 1101 | + $keydesc = wfMessage( 'configure-desc-key' )->escaped(); |
| 1102 | + } |
1091 | 1103 | |
1092 | | - if ( wfEmptyMsg( "configure-setting-$conf-key", $keydesc ) ) |
1093 | | - $keydesc = wfMsgHtml( 'configure-desc-key' ); |
1094 | | - if ( wfEmptyMsg( "configure-setting-$conf-value", $valdesc ) ) |
1095 | | - $valdesc = wfMsgHtml( 'configure-desc-val' ); |
| 1104 | + $valdescmsg = wfMessage( "configure-setting-$conf-value" ); |
| 1105 | + if ( $valdescmsg->exists() ) { |
| 1106 | + $valdesc = $valdescmsg->parse(); |
| 1107 | + } else { |
| 1108 | + $valdesc = wfMessage( 'configure-desc-val' )->escaped(); |
| 1109 | + } |
1096 | 1110 | |
1097 | 1111 | $classes = array( 'configure-array-table', 'configure-rate-limits' ); |
1098 | 1112 | |
— | — | @@ -1109,11 +1123,11 @@ |
1110 | 1124 | if ( isset( $default[$action] ) ) |
1111 | 1125 | $val = $default[$action]; |
1112 | 1126 | |
1113 | | - $key = Html::rawElement( 'td', array(), wfMsgExt( "configure-throttle-action-$action", 'parseinline' ) ); |
| 1127 | + $key = Html::rawElement( 'td', array(), wfMessage( "configure-throttle-action-$action" )->parse() ); |
1114 | 1128 | |
1115 | 1129 | ## Build YET ANOTHER ASSOC TABLE ARGH! |
1116 | | - $innerRows = Html::rawElement( 'tr', array(), Html::rawElement( 'th', array(), wfMsgExt( 'configure-throttle-group', 'parseinline' ) ) . ' ' . |
1117 | | - Html::rawElement( 'th', array(), wfMsgExt( 'configure-throttle-limit', 'parseinline' ) ) )."\n"; |
| 1130 | + $innerRows = Html::rawElement( 'tr', array(), Html::rawElement( 'th', array(), wfMessage( 'configure-throttle-group' )->parse() ) . ' ' . |
| 1131 | + Html::rawElement( 'th', array(), wfMessage( 'configure-throttle-limit' )->parse() ) )."\n"; |
1118 | 1132 | foreach( $validGroups as $type ) { |
1119 | 1133 | $limits = null; |
1120 | 1134 | if ( isset( $default[$action][$type] ) ) |
— | — | @@ -1124,16 +1138,16 @@ |
1125 | 1139 | $count = $period = 0; |
1126 | 1140 | |
1127 | 1141 | $id = 'wp'.$conf.'-key-'.$action.'-'.$type; |
1128 | | - $left_col = Html::rawElement( 'td', array(), wfMsgExt( "configure-throttle-group-$type", 'parseinline' ) ); |
| 1142 | + $left_col = Html::rawElement( 'td', array(), wfMessage( "configure-throttle-group-$type" )->parse() ); |
1129 | 1143 | |
1130 | 1144 | if ( $allowed ) { |
1131 | | - $right_col = Html::element( 'label', array( 'for' => "$id-count" ), wfMsg( 'configure-throttle-count' ) ) . |
| 1145 | + $right_col = Html::element( 'label', array( 'for' => "$id-count" ), wfMessage( 'configure-throttle-count' )->text() ) . |
1132 | 1146 | ' ' . Html::input( "$id-count", $count, 'text', array( 'name' => "$id-count", 'size' => 15 ) ) . |
1133 | 1147 | Html::element( 'br' ) . |
1134 | | - Html::element( 'label', array( 'for' => "$id-period" ), wfMsg( 'configure-throttle-period' ) ) . |
| 1148 | + Html::element( 'label', array( 'for' => "$id-period" ), wfMessage( 'configure-throttle-period' )->text() ) . |
1135 | 1149 | ' ' . Html::input( "$id-period", $period, 'text', array( 'name' => "$id-period", 'size' => 15 ) ); |
1136 | 1150 | } else { |
1137 | | - $right_col = ($count && $period) ? wfMsg( 'configure-throttle-summary', $count, $period ) : wfMsg( 'configure-throttle-none' ); |
| 1151 | + $right_col = ($count && $period) ? wfMessage( 'configure-throttle-summary', $count, $period )->text() : wfMessage( 'configure-throttle-none' )->text(); |
1138 | 1152 | ## Laziness: Make summaries work by putting the data in hidden fields, rather than a special case in JS. |
1139 | 1153 | $right_col .= "\n" . Html::hidden( "$id-count", $count, array( 'id' => "$id-count" ) ) . Html::hidden( "$id-period", $period, array( 'id' => "$id-period" ) ); |
1140 | 1154 | } |
— | — | @@ -1171,7 +1185,7 @@ |
1172 | 1186 | foreach ( $wgContLang->getNamespaces() as $ns => $name ) { |
1173 | 1187 | $name = str_replace( '_', ' ', $name ); |
1174 | 1188 | if ( '' == $name ) { |
1175 | | - $name = wfMsgExt( 'blanknamespace', array( 'parseinline' ) ); |
| 1189 | + $name = wfMessage( 'blanknamespace' )->parse(); |
1176 | 1190 | } |
1177 | 1191 | if ( $type == 'ns-bool' ) { |
1178 | 1192 | $checked = isset( $default[$ns] ) && $default[$ns]; |
— | — | @@ -1197,17 +1211,20 @@ |
1198 | 1212 | } |
1199 | 1213 | if ( $type == 'ns-text' ) { |
1200 | 1214 | global $wgContLang; |
1201 | | - $nsdesc = wfMsgHtml( 'configure-desc-ns' ); |
1202 | | - $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' ); |
| 1215 | + $nsdesc = wfMessage( 'configure-desc-ns' )->escaped(); |
| 1216 | + $valdescmsg = wfMessage( "configure-setting-$conf-value" ); |
| 1217 | + if ( $valdescmsg->exists() ) { |
| 1218 | + $valdesc = $valdescmsg->parse(); |
| 1219 | + } else { |
| 1220 | + $valdesc = wfMessage( 'configure-desc-val' )->escaped(); |
| 1221 | + } |
1203 | 1222 | |
1204 | | - if ( wfEmptyMsg( "configure-setting-$conf-value", $valdesc ) ) |
1205 | | - $valdesc = wfMsgHtml( 'configure-desc-val' ); |
1206 | 1223 | $text = Html::openElement( 'table', array( 'class' => 'configure-array-table ns-text configure-biglist' ) ) . "\n" . |
1207 | 1224 | Html::rawElement( 'tr', array(), Html::rawElement( 'th', array(), $nsdesc ) . Html::rawElement( 'th', array(), $valdesc ) ) . "\n"; |
1208 | 1225 | foreach ( $wgContLang->getNamespaces() as $ns => $name ) { |
1209 | 1226 | $name = str_replace( '_', ' ', $name ); |
1210 | 1227 | if ( '' == $name ) { |
1211 | | - $name = wfMsgExt( 'blanknamespace', array( 'parseinline' ) ); |
| 1228 | + $name = wfMessage( 'blanknamespace' )->parse(); |
1212 | 1229 | } |
1213 | 1230 | $text .= Html::openElement( 'tr', array() ) . Html::rawElement( 'td', array(), $name ) . Html::openElement( 'td', array() ); |
1214 | 1231 | if ( $allowed ) |
— | — | @@ -1225,11 +1242,14 @@ |
1226 | 1243 | } |
1227 | 1244 | if ( $type == 'ns-array' ) { |
1228 | 1245 | global $wgContLang; |
1229 | | - $nsdesc = wfMsgHtml( 'configure-desc-ns' ); |
1230 | | - $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' ); |
| 1246 | + $nsdesc = wfMessage( 'configure-desc-ns' )->escaped(); |
| 1247 | + $valdescmsg = wfMessage( "configure-setting-$conf-value" ); |
| 1248 | + if ( $valdescmsg->exists() ) { |
| 1249 | + $valdesc = $valdescmsg->parse(); |
| 1250 | + } else { |
| 1251 | + $valdesc = wfMessage( 'configure-desc-val' )->escaped(); |
| 1252 | + } |
1231 | 1253 | |
1232 | | - if ( wfEmptyMsg( "configure-setting-$conf-value", $valdesc ) ) |
1233 | | - $valdesc = wfMsgHtml( 'configure-desc-val' ); |
1234 | 1254 | $text = Html::openElement( 'table', array( 'class' => 'ns-array configure-biglist configure-array-table' ) ) . "\n" . |
1235 | 1255 | Html::rawElement( 'tr', array(), Html::rawElement( 'th', array(), $nsdesc ) . Html::rawElement( 'th', array(), $valdesc ) ) . "\n"; |
1236 | 1256 | foreach ( $wgContLang->getNamespaces() as $ns => $name ) { |
— | — | @@ -1237,7 +1257,7 @@ |
1238 | 1258 | continue; |
1239 | 1259 | $name = str_replace( '_', ' ', $name ); |
1240 | 1260 | if ( '' == $name ) { |
1241 | | - $name = wfMsgExt( 'blanknamespace', array( 'parseinline' ) ); |
| 1261 | + $name = wfMessage( 'blanknamespace' )->parse(); |
1242 | 1262 | } |
1243 | 1263 | $text .= Html::openElement( 'tr' ) . Html::rawElement( 'td', array(), |
1244 | 1264 | Html::rawElement( 'label', array( 'for' => "wp{$conf}-ns{$ns}" ), $name ) ) . Html::openElement( 'td' ); |
— | — | @@ -1278,11 +1298,14 @@ |
1279 | 1299 | $all = array_diff( $all, $this->getSettingValue( 'wgImplicitGroups' ) ); |
1280 | 1300 | } |
1281 | 1301 | sort( $all ); |
1282 | | - $groupdesc = wfMsgHtml( 'configure-desc-group' ); |
1283 | | - $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' ); |
| 1302 | + $groupdesc = wfMessage( 'configure-desc-group' )->escaped(); |
| 1303 | + $valdescmsg = wfMessage( "configure-setting-$conf-value" ); |
| 1304 | + if ( $valdescmsg->exists() ) { |
| 1305 | + $valdesc = $valdescmsg->parse(); |
| 1306 | + } else { |
| 1307 | + $valdesc = wfMessage( 'configure-desc-val' )->escaped(); |
| 1308 | + } |
1284 | 1309 | |
1285 | | - if ( wfEmptyMsg( "configure-setting-$conf-value", $valdesc ) ) |
1286 | | - $valdesc = wfMsgHtml( 'configure-desc-val' ); |
1287 | 1310 | $classes = "{$type} configure-array-table" . ( $type == 'group-bool' ? ' ajax-group' : '' ); |
1288 | 1311 | $text = Html::openElement( 'table', array( 'id' => $conf, 'class' => $classes ) ) ."\n"; |
1289 | 1312 | $text .= Html::rawElement( 'tr', array( 'class' => 'configure-maintable-row' ), |
— | — | @@ -1300,10 +1323,14 @@ |
1301 | 1324 | } |
1302 | 1325 | if ( $type == 'promotion-conds' ) { |
1303 | 1326 | |
1304 | | - $groupdesc = wfMsgHtml( 'configure-desc-group' ); |
1305 | | - $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' ); |
1306 | | - if ( wfEmptyMsg( "configure-setting-$conf-value", $valdesc ) ) |
1307 | | - $valdesc = wfMsgHtml( 'configure-desc-val' ); |
| 1327 | + $groupdesc = wfMessage( 'configure-desc-group' )->escaped(); |
| 1328 | + $valdescmsg = wfMessage( "configure-setting-$conf-value" ); |
| 1329 | + if ( $valdescmsg->exists() ) { |
| 1330 | + $valdesc = $valdescmsg->parse(); |
| 1331 | + } else { |
| 1332 | + $valdesc = wfMessage( 'configure-desc-val' )->escaped(); |
| 1333 | + } |
| 1334 | + |
1308 | 1335 | $text = Html::openElement( 'table', array( 'id' => $conf, 'class' => "{$type} configure-array-table ajax-group" ) ) ."\n"; |
1309 | 1336 | $text .= Html::rawElement( 'tr', array( 'class' => 'configure-maintable-row' ), |
1310 | 1337 | Html::rawElement( 'th', array(), $groupdesc ) . Html::rawElement( 'th', array(), $valdesc ) ) . "\n"; |
— | — | @@ -1338,7 +1365,7 @@ |
1339 | 1366 | APCOND_AGE_FROM_EDIT => 'int' ); |
1340 | 1367 | |
1341 | 1368 | $row = Html::openElement( 'div', array( 'class' => 'configure-biglist promotion-conds-element' ) ); |
1342 | | - $row .= wfMsgHtml( 'configure-condition-operator' ) . ' '; |
| 1369 | + $row .= wfMessage( 'configure-condition-operator' )->escaped() . ' '; |
1343 | 1370 | $encConf = htmlspecialchars( $conf ); |
1344 | 1371 | $encGroup = htmlspecialchars( $group ); |
1345 | 1372 | $encId = 'wp'.$encConf.'-'.$encGroup; |
— | — | @@ -1354,7 +1381,7 @@ |
1355 | 1382 | $opts['checked'] = 'checked'; |
1356 | 1383 | } |
1357 | 1384 | $row .= Html::input( $encId.'-opt-'.$desc, $desc, 'radio', $opts ) . |
1358 | | - ' ' . Html::element( 'label', array( 'for' => $encId.'-opt-'.$desc ), wfMsg( 'configure-condition-operator-'.$desc ) ); |
| 1385 | + ' ' . Html::element( 'label', array( 'for' => $encId.'-opt-'.$desc ), wfMessage( 'configure-condition-operator-'.$desc )->text() ); |
1359 | 1386 | } |
1360 | 1387 | $row .= Html::element( 'br' ) . "\n"; |
1361 | 1388 | |
— | — | @@ -1379,10 +1406,10 @@ |
1380 | 1407 | |
1381 | 1408 | $row .= Html::openElement( 'table', array( 'class' => 'configure-table-promotion' ) ); |
1382 | 1409 | |
1383 | | - $row .= Html::rawElement( 'tr', array(), Html::element( 'th', array(), wfMsg( 'configure-condition-name' ) ) . |
1384 | | - Html::element( 'th', array(), wfMsg( 'configure-condition-requirement' ) ) )."\n"; |
| 1410 | + $row .= Html::rawElement( 'tr', array(), Html::element( 'th', array(), wfMessage( 'configure-condition-name' )->text() ) . |
| 1411 | + Html::element( 'th', array(), wfMessage( 'configure-condition-requirement' )->text() ) )."\n"; |
1385 | 1412 | foreach ( $conds as $condName => $condType ) { |
1386 | | - $desc = wfMsg( 'configure-condition-name-' . $condName ); |
| 1413 | + $desc = wfMessage( 'configure-condition-name-' . $condName )->text(); |
1387 | 1414 | $row .= Html::openElement( 'tr' ) . Html::rawElement( 'td', array(), |
1388 | 1415 | Html::element( 'label', array( 'for' => "{$encId}-cond-{$condName}" ), $desc ) ) . Html::openElement( 'td' ); |
1389 | 1416 | switch( $condType ) { |
— | — | @@ -1469,7 +1496,6 @@ |
1470 | 1497 | $showLink = isset( $params['link'] ) ? $params['link'] : true; |
1471 | 1498 | |
1472 | 1499 | ## First TD |
1473 | | - $msgVal = wfMsgExt( $msg, array( 'parseinline' ) ); |
1474 | 1500 | $rawVal = Html::element( 'tt', null, "\$$conf" ); |
1475 | 1501 | if ( $showLink ) { |
1476 | 1502 | $url = 'http://www.mediawiki.org/wiki/Manual:$' . $conf; |
— | — | @@ -1477,13 +1503,17 @@ |
1478 | 1504 | } else { |
1479 | 1505 | $link = $rawVal; |
1480 | 1506 | } |
1481 | | - if ( wfEmptyMsg( $msg, $msgVal ) ) |
| 1507 | + |
| 1508 | + $msgObj = wfMessage( $msg ); |
| 1509 | + if ( $msgObj->exists() ) { |
| 1510 | + $msgVal = $msgObj->parse() . " ($link)"; |
| 1511 | + } else { |
1482 | 1512 | $msgVal = $link; |
1483 | | - else |
1484 | | - $msgVal = "$msgVal ($link)"; |
| 1513 | + } |
1485 | 1514 | |
1486 | | - if ( $params['customised'] ) |
1487 | | - $msgVal = Html::rawElement( 'p', null, $msgVal ).wfMsgExt( 'configure-customised', 'parse' ); |
| 1515 | + if ( $params['customised'] ) { |
| 1516 | + $msgVal = Html::rawElement( 'p', null, $msgVal ) . wfMessage( 'configure-customised' )->parseAsBlock(); |
| 1517 | + } |
1488 | 1518 | |
1489 | 1519 | $attribs = array(); |
1490 | 1520 | $attribs['style'] = 'text-align:' . ( $wgContLang->isRtl() ? 'right' : 'left' ) . ';vertical-align:top;'; |
— | — | @@ -1588,7 +1618,7 @@ |
1589 | 1619 | } |
1590 | 1620 | |
1591 | 1621 | if ( $thisSection ) { |
1592 | | - $thisSection = Html::rawElement( 'legend', null, wfMsgExt( "configure-section-$title", array( 'parseinline' ) ) ) . $thisSection; |
| 1622 | + $thisSection = Html::rawElement( 'legend', null, wfMessage( "configure-section-$title" )->parse() ) . $thisSection; |
1593 | 1623 | $ret .= Html::rawElement( 'fieldset', null, $thisSection ); |
1594 | 1624 | } |
1595 | 1625 | } |
Index: trunk/extensions/Configure/Configure.diff.php |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | $old = $this->getOldVersion(); |
120 | 120 | $new = $this->getNewVersion(); |
121 | 121 | if ( !( $wikis = $this->cleanWikis( $old, $new ) ) ) { |
122 | | - return wfMsgExt( 'configure-no-diff', array( 'parse' ) ); |
| 122 | + return wfMessage( 'configure-no-diff' )->parseAsBlock(); |
123 | 123 | } |
124 | 124 | $text = ''; |
125 | 125 | foreach ( $wikis as $wiki ) { |
— | — | @@ -152,22 +152,25 @@ |
153 | 153 | $groupDiff .= $this->processDiffSetting( $setting, $oldSetting, $newSetting, $type ) . "\n"; |
154 | 154 | } |
155 | 155 | if ( $groupDiff != '' ) { |
156 | | - $name = wfMsgExt( 'configure-section-' . $groupName, array( 'parseinline' ) ); |
157 | | - if ( wfEmptyMsg( 'configure-section-' . $groupName, $name ) ) |
| 156 | + $msg = wfMessage( 'configure-section-' . $groupName ); |
| 157 | + if ( $msg->exists() ) { |
| 158 | + $name = $msg->parse(); |
| 159 | + } else { |
158 | 160 | $name = $groupName; |
| 161 | + } |
159 | 162 | $sectionDiff .= "<tr><td colspan=\"4\"><h4 class=\"config-diff-group\">{$name}</h4></td></tr>\n"; |
160 | 163 | $sectionDiff .= $groupDiff; |
161 | 164 | } |
162 | 165 | } |
163 | 166 | if ( $sectionDiff != '' ) { |
164 | | - $name = wfMsgExt( 'configure-section-' . $sectionName, array( 'parseinline' ) ); |
| 167 | + $name = wfMessage( 'configure-section-' . $sectionName )->parse(); |
165 | 168 | $text .= "<tr><td colspan=\"4\"><h3 class=\"config-diff-section\">{$name}</h3></td></tr>\n"; |
166 | 169 | $text .= $sectionDiff; |
167 | 170 | } |
168 | 171 | } |
169 | 172 | |
170 | 173 | if ( empty( $text ) ) |
171 | | - return wfMsgExt( 'configure-no-diff', array( 'parse' ) ); |
| 174 | + return wfMessage( 'configure-no-diff' )->parseAsBlock(); |
172 | 175 | |
173 | 176 | $ret = "<table class='diff'>\n"; |
174 | 177 | $ret .= "<col class='diff-marker' />"; |
— | — | @@ -189,13 +192,13 @@ |
190 | 193 | * @return String: XHTML |
191 | 194 | */ |
192 | 195 | function processDiffSetting( $name, $old, $new, $type ) { |
193 | | - $msg = 'configure-setting-' . $name; |
194 | | - $msgVal = wfMsgExt( $msg, array( 'parseinline' ) ); |
| 196 | + $msg = wfMessage( 'configure-setting-' . $name ); |
195 | 197 | $rawVal = Xml::element( 'tt', null, "\$$name" ); |
196 | | - if ( wfEmptyMsg( $msg, $msgVal ) ) |
| 198 | + if ( $msg->exists() ) { |
| 199 | + $msgVal = $msg->parse() . " ($rawVal)"; |
| 200 | + } else { |
197 | 201 | $msgVal = $rawVal; |
198 | | - else |
199 | | - $msgVal = "$msgVal ($rawVal)"; |
| 202 | + } |
200 | 203 | |
201 | 204 | $oldSet = $this->getSettingAsArray( WebConfiguration::filterVar( $old ), $name, $type ); |
202 | 205 | $newSet = $this->getSettingAsArray( WebConfiguration::filterVar( $new ), $name, $type ); |
— | — | @@ -272,7 +275,7 @@ |
273 | 276 | if ($count == 0 || $period == 0) |
274 | 277 | continue; |
275 | 278 | |
276 | | - $val[] = "$action, $group: " . wfMsg( 'configure-throttle-summary', $count, $period ); |
| 279 | + $val[] = "$action, $group: " . wfMessage( 'configure-throttle-summary', $count, $period )->text(); |
277 | 280 | } |
278 | 281 | } |
279 | 282 | } |
— | — | @@ -285,11 +288,11 @@ |
286 | 289 | |
287 | 290 | foreach( $setting as $group => $conds ) { |
288 | 291 | if ( !is_array( $conds ) ) { |
289 | | - $val[] = "$group: ".wfMsg( "configure-condition-description-$conds" ); |
| 292 | + $val[] = "$group: ".wfMessage( "configure-condition-description-$conds" )->text(); |
290 | 293 | continue; |
291 | 294 | } |
292 | 295 | if ( count( $conds ) == 0 ) { |
293 | | - $val[] = "$group: ".wfMsg( 'configure-autopromote-noconds' ); |
| 296 | + $val[] = "$group: ".wfMessage( 'configure-autopromote-noconds' )->text(); |
294 | 297 | continue; |
295 | 298 | } |
296 | 299 | |
— | — | @@ -297,7 +300,7 @@ |
298 | 301 | $boolop = array_shift( $conds ); |
299 | 302 | $boolop = $opToName[$boolop]; |
300 | 303 | |
301 | | - $val[] = "$group: " . wfMsg( "configure-boolop-description-$boolop" ); |
| 304 | + $val[] = "$group: " . wfMessage( "configure-boolop-description-$boolop" )->text(); |
302 | 305 | } else { |
303 | 306 | $conds = array( $conds ); |
304 | 307 | } |
— | — | @@ -305,7 +308,7 @@ |
306 | 309 | // Analyse each individual one... |
307 | 310 | foreach( $conds as $cond ) { |
308 | 311 | if ($cond == array( APCOND_AGE, -1 ) ) { |
309 | | - $val[] = "$group: " . wfMsg( 'configure-autopromote-noconds' ); |
| 312 | + $val[] = "$group: " . wfMessage( 'configure-autopromote-noconds' )->text(); |
310 | 313 | continue; |
311 | 314 | } |
312 | 315 | |
— | — | @@ -318,7 +321,7 @@ |
319 | 322 | $argSummary = implode( ', ', $cond ); |
320 | 323 | $count = count( $cond ); |
321 | 324 | |
322 | | - $val[] = "$group: ".wfMsgExt( "configure-condition-description-$name", array( 'parsemag' ), $argSummary, $count ); |
| 325 | + $val[] = "$group: ".wfMessage( "configure-condition-description-$name", $argSummary, $count )->text(); |
323 | 326 | } |
324 | 327 | } |
325 | 328 | } else { |