Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1211,6 +1211,17 @@ |
1212 | 1212 | return $block; |
1213 | 1213 | } |
1214 | 1214 | |
| 1215 | + public function formatRevisionSize( $size ) { |
| 1216 | + if ( $size == 0 ) { |
| 1217 | + $stxt = wfMsgExt( 'historyempty', 'parsemag' ); |
| 1218 | + } else { |
| 1219 | + $stxt = wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $size ) ); |
| 1220 | + $stxt = "($stxt)"; |
| 1221 | + } |
| 1222 | + $stxt = htmlspecialchars( $stxt ); |
| 1223 | + return "<span class=\"history-size\">$stxt</span>"; |
| 1224 | + } |
| 1225 | + |
1215 | 1226 | /** @todo document */ |
1216 | 1227 | function tocIndent() { |
1217 | 1228 | return "\n<ul>"; |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -1086,12 +1086,7 @@ |
1087 | 1087 | $userLink = $sk->revUserTools( $rev ); |
1088 | 1088 | |
1089 | 1089 | if(!is_null($size = $row->ar_len)) { |
1090 | | - if($size == 0) { |
1091 | | - $stxt = wfMsg('historyempty'); |
1092 | | - } else { |
1093 | | - $stxt = '(' . wfMsg('nbytes', $wgLang->formatNum( $size ) ) . ')'; |
1094 | | - } |
1095 | | - $stxt = htmlspecialchars( $stxt ); |
| 1090 | + $stxt = $sk->formatRevisionSize( $size ); |
1096 | 1091 | } |
1097 | 1092 | $comment = $sk->revComment( $rev ); |
1098 | 1093 | $revdlink = ''; |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -595,7 +595,7 @@ |
596 | 596 | $data = wfMsg( 'widthheight', |
597 | 597 | $wgLang->formatNum( $file->getWidth() ), |
598 | 598 | $wgLang->formatNum( $file->getHeight() ) ) . |
599 | | - ' (' . wfMsg( 'nbytes', $wgLang->formatNum( $file->getSize() ) ) . ')'; |
| 599 | + ' (' . wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $file->getSize() ) ) . ')'; |
600 | 600 | $data = htmlspecialchars( $data ); |
601 | 601 | |
602 | 602 | return "<li>$pageLink ".$this->fileUserTools( $file )." $data ".$this->fileComment( $file )."$del</li>"; |
— | — | @@ -622,7 +622,7 @@ |
623 | 623 | $data = wfMsg( 'widthheight', |
624 | 624 | $wgLang->formatNum( $file->getWidth() ), |
625 | 625 | $wgLang->formatNum( $file->getHeight() ) ) . |
626 | | - ' (' . wfMsg( 'nbytes', $wgLang->formatNum( $file->getSize() ) ) . ')'; |
| 626 | + ' (' . wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $file->getSize() ) ) . ')'; |
627 | 627 | $data = htmlspecialchars( $data ); |
628 | 628 | |
629 | 629 | return "<li> $pageLink ".$this->fileUserTools( $file )." $data ".$this->fileComment( $file )."$del</li>"; |
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php |
— | — | @@ -89,14 +89,7 @@ |
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!is_null($size = $row->page_len)) { |
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 ); |
100 | | - $stxt = $wgContLang->getDirMark() . ' ' . $stxt; |
| 93 | + $stxt = $wgContLang->getDirMark() . ' ' . $skin->formatRevisionSize( $size ); |
101 | 94 | } |
102 | 95 | |
103 | 96 | # Show a link to the change protection form for allowed users otherwise a link to the protection log |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -247,13 +247,7 @@ |
248 | 248 | $userLink = $this->sk->revUserTools( $rev ); |
249 | 249 | |
250 | 250 | if(!is_null($size = $row->rev_len)) { |
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 ); |
| 251 | + $stxt = $this->sk->formatRevisionSize( $size ); |
258 | 252 | } |
259 | 253 | $comment = $this->sk->revComment( $rev ); |
260 | 254 | |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -245,14 +245,7 @@ |
246 | 246 | } |
247 | 247 | |
248 | 248 | if ( !is_null( $size = $rev->getSize() ) && $rev->userCan( Revision::DELETED_TEXT ) ) { |
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 ); |
256 | | - $s .= " <span class=\"history-size\">$stxt</span>"; |
| 249 | + $s .= ' ' . $this->mSkin->formatRevisionSize( $size ); |
257 | 250 | } |
258 | 251 | |
259 | 252 | $s .= $this->mSkin->revComment( $rev, false, true ); |