r44877 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44876‎ | r44877 | r44878 >
Date:18:35, 21 December 2008
Author:ialex
Status:ok (Comments)
Tags:
Comment:
html -> wikitext in table headers
Modified paths:
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -120,7 +120,7 @@
121121 private function getPageStats() {
122122 global $wgLang;
123123 return Xml::openElement( 'tr' ) .
124 - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsg( 'statistics-header-pages' ) ) .
 124+ Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-pages', array( 'parseinline' ) ) ) .
125125 Xml::closeElement( 'tr' ) .
126126 $this->formatRow( wfMsgExt( 'statistics-articles', array( 'parseinline' ) ),
127127 $wgLang->formatNum( $this->good ),
@@ -136,7 +136,7 @@
137137 private function getEditStats() {
138138 global $wgLang;
139139 return Xml::openElement( 'tr' ) .
140 - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsg( 'statistics-header-edits' ) ) .
 140+ Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-edits', array( 'parseinline' ) ) ) .
141141 Xml::closeElement( 'tr' ) .
142142 $this->formatRow( wfMsgExt( 'statistics-edits', array( 'parseinline' ) ),
143143 $wgLang->formatNum( $this->edits ),
@@ -151,7 +151,7 @@
152152 private function getUserStats() {
153153 global $wgLang, $wgRCMaxAge;
154154 return Xml::openElement( 'tr' ) .
155 - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsg( 'statistics-header-users' ) ) .
 155+ Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-users', array( 'parseinline' ) ) ) .
156156 Xml::closeElement( 'tr' ) .
157157 $this->formatRow( wfMsgExt( 'statistics-users', array( 'parseinline' ) ),
158158 $wgLang->formatNum( $this->users ),
@@ -184,7 +184,7 @@
185185 } else {
186186 $grouppageLocalized = $msg;
187187 }
188 - $grouppage = $sk->makeLink( $grouppageLocalized, $groupnameLocalized );
 188+ $grouppage = $sk->makeLink( $grouppageLocalized, htmlspecialchars( $groupnameLocalized ) );
189189 $grouplink = $sk->link( SpecialPage::getTitleFor( 'Listusers' ),
190190 wfMsgHtml( 'listgrouprights-members' ),
191191 array(),
@@ -205,7 +205,7 @@
206206 private function getViewsStats() {
207207 global $wgLang;
208208 return Xml::openElement( 'tr' ) .
209 - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsg( 'statistics-header-views' ) ) .
 209+ Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-views', array( 'parseinline' ) ) ) .
210210 Xml::closeElement( 'tr' ) .
211211 $this->formatRow( wfMsgExt( 'statistics-views-total', array( 'parseinline' ) ),
212212 $wgLang->formatNum( $this->views ),
@@ -238,7 +238,7 @@
239239 )
240240 );
241241 if( $res->numRows() > 0 ) {
242 - $text .= Xml::tags( 'th', array( 'colspan' => '2' ), wfMsg( 'statistics-mostpopular' ) );
 242+ $text .= Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-mostpopular', array( 'parseinline' ) ) );
243243 while( $row = $res->fetchObject() ) {
244244 $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
245245 if( $title instanceof Title ) {

Comments

#Comment by Brion VIBBER (talk | contribs)   21:01, 23 December 2008

This class is calling out to be refactored to avoid duplication of table layout code! :)

Status & tagging log