Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -1086,10 +1086,12 @@ |
1087 | 1087 | $userLink = $sk->revUserTools( $rev ); |
1088 | 1088 | |
1089 | 1089 | if(!is_null($size = $row->ar_len)) { |
1090 | | - if($size == 0) |
1091 | | - $stxt = wfMsgHtml('historyempty'); |
1092 | | - else |
1093 | | - $stxt = wfMsgHtml('historysize', $wgLang->formatNum( $size ) ); |
| 1090 | + if($size == 0) { |
| 1091 | + $stxt = wfMsg('historyempty'); |
| 1092 | + } else { |
| 1093 | + $stxt = '(' . wfMsg('nbytes', $wgLang->formatNum( $size ) ) . ')'; |
| 1094 | + } |
| 1095 | + $stxt = htmlspecialchars( $stxt ); |
1094 | 1096 | } |
1095 | 1097 | $comment = $sk->revComment( $rev ); |
1096 | 1098 | $revdlink = ''; |
— | — | @@ -1131,12 +1133,13 @@ |
1132 | 1134 | } |
1133 | 1135 | $userLink = $this->getFileUser( $file, $sk ); |
1134 | 1136 | $data = |
1135 | | - wfMsgHtml( 'widthheight', |
| 1137 | + wfMsg( 'widthheight', |
1136 | 1138 | $wgLang->formatNum( $row->fa_width ), |
1137 | 1139 | $wgLang->formatNum( $row->fa_height ) ) . |
1138 | 1140 | ' (' . |
1139 | | - wfMsgHtml( 'nbytes', $wgLang->formatNum( $row->fa_size ) ) . |
| 1141 | + wfMsg( 'nbytes', $wgLang->formatNum( $row->fa_size ) ) . |
1140 | 1142 | ')'; |
| 1143 | + $data = htmlspecialchars( $data ); |
1141 | 1144 | $comment = $this->getFileComment( $file, $sk ); |
1142 | 1145 | $revdlink = ''; |
1143 | 1146 | if( $wgUser->isAllowed( 'deleterevision' ) ) { |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | # If this is a revision, then we need a target page |
23 | 23 | $page = Title::newFromUrl( $target ); |
24 | 24 | if( is_null($page) ) { |
25 | | - $wgOut->addWikiText( wfMsgHtml( 'undelete-header' ) ); |
| 25 | + $wgOut->addWikiMsg( 'undelete-header' ); |
26 | 26 | return; |
27 | 27 | } |
28 | 28 | # Only one target set at a time please! |
— | — | @@ -256,7 +256,7 @@ |
257 | 257 | |
258 | 258 | $wgOut->addHtml( "</ul>" ); |
259 | 259 | |
260 | | - $wgOut->addWikiText( wfMsgHtml( 'revdelete-text' ) ); |
| 260 | + $wgOut->addWikiMsg( 'revdelete-text' ); |
261 | 261 | |
262 | 262 | // Normal sysops can always see what they did, but can't always change it |
263 | 263 | if( !$UserAllowed ) return; |
— | — | @@ -272,10 +272,10 @@ |
273 | 273 | ); |
274 | 274 | if( $this->deleteKey=='oldid' ) { |
275 | 275 | foreach( $revObjs as $rev ) |
276 | | - $hidden[] = wfHidden( 'oldid[]', $rev->getId() ); |
| 276 | + $hidden[] = Xml::hidden( 'oldid[]', $rev->getId() ); |
277 | 277 | } else { |
278 | 278 | foreach( $revObjs as $rev ) |
279 | | - $hidden[] = wfHidden( 'artimestamp[]', $rev->getTimestamp() ); |
| 279 | + $hidden[] = Xml::hidden( 'artimestamp[]', $rev->getTimestamp() ); |
280 | 280 | } |
281 | 281 | $special = SpecialPage::getTitleFor( 'Revisiondelete' ); |
282 | 282 | $wgOut->addHtml( |
— | — | @@ -306,13 +306,15 @@ |
307 | 307 | * This lets a user set restrictions for archived images |
308 | 308 | */ |
309 | 309 | function showImages() { |
310 | | - global $wgOut, $wgUser, $action; |
| 310 | + // What is $action doing here??? |
| 311 | + global $wgOut, $wgUser, $action, $wgLang; |
311 | 312 | |
312 | 313 | $UserAllowed = true; |
313 | 314 | |
314 | 315 | $count = ($this->deleteKey=='oldimage') ? count($this->ofiles) : count($this->afiles); |
315 | | - $wgOut->addWikiText( wfMsgExt( 'revdelete-selected', array('parsemag'), |
316 | | - $this->page->getPrefixedText(), $count ) ); |
| 316 | + $wgOut->addWikiMsg( 'revdelete-selected', |
| 317 | + $this->page->getPrefixedText(), |
| 318 | + $wgLang->formatNum($count) ); |
317 | 319 | |
318 | 320 | $bitfields = 0; |
319 | 321 | $wgOut->addHtml( "<ul>" ); |
— | — | @@ -393,7 +395,7 @@ |
394 | 396 | |
395 | 397 | $wgOut->addHtml( "</ul>" ); |
396 | 398 | |
397 | | - $wgOut->addWikiText( wfMsgHtml( 'revdelete-text' ) ); |
| 399 | + $wgOut->addWikiMsg('revdelete-text' ); |
398 | 400 | //Normal sysops can always see what they did, but can't always change it |
399 | 401 | if( !$UserAllowed ) return; |
400 | 402 | |
— | — | @@ -408,17 +410,16 @@ |
409 | 411 | ); |
410 | 412 | if( $this->deleteKey=='oldimage' ) { |
411 | 413 | foreach( $this->ofiles as $filename ) |
412 | | - $hidden[] = wfHidden( 'oldimage[]', $filename ); |
| 414 | + $hidden[] = Xml::hidden( 'oldimage[]', $filename ); |
413 | 415 | } else { |
414 | 416 | foreach( $this->afiles as $fileid ) |
415 | | - $hidden[] = wfHidden( 'fileid[]', $fileid ); |
| 417 | + $hidden[] = Xml::hidden( 'fileid[]', $fileid ); |
416 | 418 | } |
417 | 419 | $special = SpecialPage::getTitleFor( 'Revisiondelete' ); |
418 | 420 | $wgOut->addHtml( |
419 | 421 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $special->getLocalUrl( 'action=submit' ), |
420 | 422 | 'id' => 'mw-revdel-form-filerevisions' ) ) . |
421 | | - Xml::openElement( 'fieldset' ) . |
422 | | - xml::element( 'legend', null, wfMsg( 'revdelete-legend' ) ) |
| 423 | + Xml::fiedlset( wfMsg( 'revdelete-legend' ) ) |
423 | 424 | ); |
424 | 425 | // FIXME: all items checked for just one file are checked, even if not set for the others |
425 | 426 | foreach( $this->checks as $item ) { |
— | — | @@ -426,7 +427,7 @@ |
427 | 428 | $wgOut->addHtml( Xml::tags( 'div', null, Xml::checkLabel( wfMsg( $message ), $name, $name, $bitfields & $field ) ) ); |
428 | 429 | } |
429 | 430 | foreach( $items as $item ) { |
430 | | - $wgOut->addHtml( Xml::tags( 'p', null, $item ) ); |
| 431 | + $wgOut->addHtml( "<p>$item</p>" ); |
431 | 432 | } |
432 | 433 | foreach( $hidden as $item ) { |
433 | 434 | $wgOut->addHtml( $item ); |
— | — | @@ -442,10 +443,10 @@ |
443 | 444 | * This lets a user set restrictions for log items |
444 | 445 | */ |
445 | 446 | function showLogItems() { |
446 | | - global $wgOut, $wgUser, $action, $wgMessageCache; |
| 447 | + global $wgOut, $wgUser, $action, $wgMessageCache, $wgLang; |
447 | 448 | |
448 | 449 | $UserAllowed = true; |
449 | | - $wgOut->addWikiText( wfMsgExt( 'logdelete-selected', array('parsemag'), count($this->events) ) ); |
| 450 | + $wgOut->addWikiMsg( 'logdelete-selected', $wgLang->formatNum( count($this->events) ) ); |
450 | 451 | |
451 | 452 | $bitfields = 0; |
452 | 453 | $wgOut->addHtml( "<ul>" ); |
— | — | @@ -508,8 +509,7 @@ |
509 | 510 | $wgOut->addHtml( |
510 | 511 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $special->getLocalUrl( 'action=submit' ), |
511 | 512 | 'id' => 'mw-revdel-form-logs' ) ) . |
512 | | - Xml::openElement( 'fieldset' ) . |
513 | | - xml::element( 'legend', null, wfMsg( 'revdelete-legend' ) ) |
| 513 | + Xml::fieldset( wfMsg( 'revdelete-legend' ) ) |
514 | 514 | ); |
515 | 515 | // FIXME: all items checked for just on event are checked, even if not set for the others |
516 | 516 | foreach( $this->checks as $item ) { |
— | — | @@ -517,7 +517,7 @@ |
518 | 518 | $wgOut->addHtml( Xml::tags( 'div', null, Xml::checkLabel( wfMsg( $message ), $name, $name, $bitfields & $field ) ) ); |
519 | 519 | } |
520 | 520 | foreach( $items as $item ) { |
521 | | - $wgOut->addHtml( Xml::tags( 'p', null, $item ) ); |
| 521 | + $wgOut->addHtml( "<p>$item</p>" ); |
522 | 522 | } |
523 | 523 | foreach( $hidden as $item ) { |
524 | 524 | $wgOut->addHtml( $item ); |
— | — | @@ -592,10 +592,11 @@ |
593 | 593 | $pageLink = "<a href=\"{$url}\">{$date}</a>"; |
594 | 594 | } |
595 | 595 | |
596 | | - $data = wfMsgHtml( 'widthheight', |
| 596 | + $data = wfMsg( 'widthheight', |
597 | 597 | $wgContLang->formatNum( $file->getWidth() ), |
598 | 598 | $wgContLang->formatNum( $file->getHeight() ) ) . |
599 | | - ' (' . wfMsgHtml( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')'; |
| 599 | + ' (' . wfMsg( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')'; |
| 600 | + $data = htmlspecialchars( $data ); |
600 | 601 | |
601 | 602 | return "<li>$pageLink ".$this->fileUserTools( $file )." $data ".$this->fileComment( $file )."$del</li>"; |
602 | 603 | } |
— | — | @@ -618,10 +619,11 @@ |
619 | 620 | $del = ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>'; |
620 | 621 | } |
621 | 622 | |
622 | | - $data = wfMsgHtml( 'widthheight', |
| 623 | + $data = wfMsg( 'widthheight', |
623 | 624 | $wgContLang->formatNum( $file->getWidth() ), |
624 | 625 | $wgContLang->formatNum( $file->getHeight() ) ) . |
625 | | - ' (' . wfMsgHtml( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')'; |
| 626 | + ' (' . wfMsg( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')'; |
| 627 | + $data = htmlspecialchars( $data ); |
626 | 628 | |
627 | 629 | return "<li> $pageLink ".$this->fileUserTools( $file )." $data ".$this->fileComment( $file )."$del</li>"; |
628 | 630 | } |
— | — | @@ -728,19 +730,21 @@ |
729 | 731 | private function success() { |
730 | 732 | global $wgOut; |
731 | 733 | |
732 | | - $wgOut->setPagetitle( wfMsgHtml( 'actioncomplete' ) ); |
| 734 | + $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); |
733 | 735 | |
| 736 | + $wrap = '<span class="success">$1</span>'; |
| 737 | + |
734 | 738 | if( $this->deleteKey=='logid' ) { |
735 | | - $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'logdelete-success' ) ), false ); |
| 739 | + $wgOut->wrapWikiMsg( $wrap, 'logdelete-success' ); |
736 | 740 | $this->showLogItems(); |
737 | 741 | } else if( $this->deleteKey=='oldid' || $this->deleteKey=='artimestamp' ) { |
738 | | - $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'revdelete-success' ) ), false ); |
| 742 | + $wgOut->wrapWikiMsg( $wrap, 'revdelete-success' ); |
739 | 743 | $this->showRevs(); |
740 | 744 | } else if( $this->deleteKey=='fileid' ) { |
741 | | - $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'revdelete-success' ) ), false ); |
| 745 | + $wgOut->wrapWikiMsg( $wrap, 'revdelete-success' ); |
742 | 746 | $this->showImages(); |
743 | 747 | } else if( $this->deleteKey=='oldimage' ) { |
744 | | - $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'revdelete-success' ) ), false ); |
| 748 | + $wgOut->wrapWikiMsg( $wrap, 'revdelete-success' ); |
745 | 749 | $this->showImages(); |
746 | 750 | } |
747 | 751 | } |
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php |
— | — | @@ -89,10 +89,13 @@ |
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!is_null($size = $row->page_len)) { |
93 | | - if ($size == 0) |
94 | | - $stxt = ' <small>' . wfMsgHtml('historyempty') . '</small>'; |
95 | | - else |
96 | | - $stxt = ' <small>' . wfMsgHtml('historysize', $wgLang->formatNum( $size ) ) . '</small>'; |
| 93 | + if ($size == 0) { |
| 94 | + $stxt = wfMsg('historyempty'); |
| 95 | + } else { |
| 96 | + $stxt = wfMsg('nbytes', $wgLang->formatNum( $size ) ); |
| 97 | + $stxt = "($stxt)"; |
| 98 | + } |
| 99 | + $stxt = htmlspecialchars( $stxt ); |
97 | 100 | $stxt = $wgContLang->getDirMark() . $stxt; |
98 | 101 | } |
99 | 102 | |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -247,10 +247,13 @@ |
248 | 248 | $userLink = $this->sk->revUserTools( $rev ); |
249 | 249 | |
250 | 250 | if(!is_null($size = $row->rev_len)) { |
251 | | - if($size == 0) |
252 | | - $stxt = wfMsgHtml('historyempty'); |
253 | | - else |
254 | | - $stxt = wfMsgHtml('historysize', $wgLang->formatNum( $size ) ); |
| 251 | + if($size == 0) { |
| 252 | + $stxt = wfMsg('historyempty'); |
| 253 | + } else { |
| 254 | + $stxt = wfMsg('nbytes', $wgLang->formatNum( $size ) ); |
| 255 | + $stxt = "($stxt)"; |
| 256 | + } |
| 257 | + $stxt = htmlspecialchars( $stxt ); |
255 | 258 | } |
256 | 259 | $comment = $this->sk->revComment( $rev ); |
257 | 260 | |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -245,10 +245,13 @@ |
246 | 246 | } |
247 | 247 | |
248 | 248 | if ( !is_null( $size = $rev->getSize() ) && $rev->userCan( Revision::DELETED_TEXT ) ) { |
249 | | - if ( $size == 0 ) |
250 | | - $stxt = wfMsgHtml( 'historyempty' ); |
251 | | - else |
252 | | - $stxt = wfMsgExt( 'historysize', array( 'parsemag' ), $wgLang->formatNum( $size ) ); |
| 249 | + if ( $size == 0 ) { |
| 250 | + $stxt = wfMsg( 'historyempty' ); |
| 251 | + } else { |
| 252 | + $stxt = wfMsg( 'nbytes', $wgLang->formatNum( $size ) ); |
| 253 | + $stxt = "($stxt)"; |
| 254 | + } |
| 255 | + $stxt = htmlspecialchars( $stxt ); |
253 | 256 | $s .= " <span class=\"history-size\">$stxt</span>"; |
254 | 257 | } |
255 | 258 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1209,7 +1209,6 @@ |
1210 | 1210 | 'deletedrev' => '[deleted]', |
1211 | 1211 | 'histfirst' => 'Earliest', |
1212 | 1212 | 'histlast' => 'Latest', |
1213 | | -'historysize' => '({{PLURAL:$1|1 byte|$1 bytes}})', |
1214 | 1213 | 'historyempty' => '(empty)', |
1215 | 1214 | |
1216 | 1215 | # Revision feed |