Index: trunk/phase3/includes/specials/SpecialStatistics.php |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | $text .= Xml::closeElement( 'table' ); |
99 | 99 | |
100 | 100 | # Customizable footer |
101 | | - $footer = wfMessage( 'statistics-footer' ); |
| 101 | + $footer = $this->msg( 'statistics-footer' ); |
102 | 102 | if ( !$footer->isBlank() ) { |
103 | 103 | $text .= "\n" . $footer->parse(); |
104 | 104 | } |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | */ |
118 | 118 | private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) { |
119 | 119 | if( $descMsg ) { |
120 | | - $msg = wfMessage( $descMsg, $descMsgParam ); |
| 120 | + $msg = $this->msg( $descMsg, $descMsgParam ); |
121 | 121 | if ( $msg->exists() ) { |
122 | 122 | $descriptionText = $msg->parse(); |
123 | 123 | $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc'), |
— | — | @@ -136,29 +136,29 @@ |
137 | 137 | */ |
138 | 138 | private function getPageStats() { |
139 | 139 | return Xml::openElement( 'tr' ) . |
140 | | - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-pages', array( 'parseinline' ) ) ) . |
| 140 | + Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-pages' )->parse() ) . |
141 | 141 | Xml::closeElement( 'tr' ) . |
142 | 142 | $this->formatRow( Linker::linkKnown( SpecialPage::getTitleFor( 'Allpages' ), |
143 | | - wfMsgExt( 'statistics-articles', array( 'parseinline' ) ) ), |
| 143 | + $this->msg( 'statistics-articles' )->parse() ), |
144 | 144 | $this->getLanguage()->formatNum( $this->good ), |
145 | 145 | array( 'class' => 'mw-statistics-articles' ) ) . |
146 | | - $this->formatRow( wfMsgExt( 'statistics-pages', array( 'parseinline' ) ), |
| 146 | + $this->formatRow( $this->msg( 'statistics-pages' )->parse(), |
147 | 147 | $this->getLanguage()->formatNum( $this->total ), |
148 | 148 | array( 'class' => 'mw-statistics-pages' ), |
149 | 149 | 'statistics-pages-desc' ) . |
150 | 150 | $this->formatRow( Linker::linkKnown( SpecialPage::getTitleFor( 'Listfiles' ), |
151 | | - wfMsgExt( 'statistics-files', array( 'parseinline' ) ) ), |
| 151 | + $this->msg( 'statistics-files' )->parse() ), |
152 | 152 | $this->getLanguage()->formatNum( $this->images ), |
153 | 153 | array( 'class' => 'mw-statistics-files' ) ); |
154 | 154 | } |
155 | 155 | private function getEditStats() { |
156 | 156 | return Xml::openElement( 'tr' ) . |
157 | | - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-edits', array( 'parseinline' ) ) ) . |
| 157 | + Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-edits' )->parse() ) . |
158 | 158 | Xml::closeElement( 'tr' ) . |
159 | | - $this->formatRow( wfMsgExt( 'statistics-edits', array( 'parseinline' ) ), |
| 159 | + $this->formatRow( $this->msg( 'statistics-edits' )->parse(), |
160 | 160 | $this->getLanguage()->formatNum( $this->edits ), |
161 | 161 | array( 'class' => 'mw-statistics-edits' ) ) . |
162 | | - $this->formatRow( wfMsgExt( 'statistics-edits-average', array( 'parseinline' ) ), |
| 162 | + $this->formatRow( $this->msg( 'statistics-edits-average' )->parse(), |
163 | 163 | $this->getLanguage()->formatNum( sprintf( '%.2f', $this->total ? $this->edits / $this->total : 0 ) ), |
164 | 164 | array( 'class' => 'mw-statistics-edits-average' ) ); |
165 | 165 | } |
— | — | @@ -166,15 +166,15 @@ |
167 | 167 | private function getUserStats() { |
168 | 168 | global $wgActiveUserDays; |
169 | 169 | return Xml::openElement( 'tr' ) . |
170 | | - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-users', array( 'parseinline' ) ) ) . |
| 170 | + Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-users' )->parse() ) . |
171 | 171 | Xml::closeElement( 'tr' ) . |
172 | | - $this->formatRow( wfMsgExt( 'statistics-users', array( 'parseinline' ) ), |
| 172 | + $this->formatRow( $this->msg( 'statistics-users' )->parse(), |
173 | 173 | $this->getLanguage()->formatNum( $this->users ), |
174 | 174 | array( 'class' => 'mw-statistics-users' ) ) . |
175 | | - $this->formatRow( wfMsgExt( 'statistics-users-active', array( 'parseinline' ) ) . ' ' . |
| 175 | + $this->formatRow( $this->msg( 'statistics-users-active' )->parse() . ' ' . |
176 | 176 | Linker::linkKnown( |
177 | 177 | SpecialPage::getTitleFor( 'Activeusers' ), |
178 | | - wfMsgHtml( 'listgrouprights-members' ) |
| 178 | + $this->msg( 'listgrouprights-members' )->escaped() |
179 | 179 | ), |
180 | 180 | $this->getLanguage()->formatNum( $this->activeUsers ), |
181 | 181 | array( 'class' => 'mw-statistics-users-active' ), |
— | — | @@ -191,13 +191,13 @@ |
192 | 192 | continue; |
193 | 193 | } |
194 | 194 | $groupname = htmlspecialchars( $group ); |
195 | | - $msg = wfMessage( 'group-' . $groupname ); |
| 195 | + $msg = $this->msg( 'group-' . $groupname ); |
196 | 196 | if ( $msg->isBlank() ) { |
197 | 197 | $groupnameLocalized = $groupname; |
198 | 198 | } else { |
199 | 199 | $groupnameLocalized = $msg->text(); |
200 | 200 | } |
201 | | - $msg = wfMessage( 'grouppage-' . $groupname )->inContentLanguage(); |
| 201 | + $msg = $this->msg( 'grouppage-' . $groupname )->inContentLanguage(); |
202 | 202 | if ( $msg->isBlank() ) { |
203 | 203 | $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname; |
204 | 204 | } else { |
— | — | @@ -210,7 +210,7 @@ |
211 | 211 | ); |
212 | 212 | $grouplink = Linker::linkKnown( |
213 | 213 | SpecialPage::getTitleFor( 'Listusers' ), |
214 | | - wfMsgHtml( 'listgrouprights-members' ), |
| 214 | + $this->msg( 'listgrouprights-members' )->escaped(), |
215 | 215 | array(), |
216 | 216 | array( 'group' => $group ) |
217 | 217 | ); |
— | — | @@ -229,12 +229,12 @@ |
230 | 230 | |
231 | 231 | private function getViewsStats() { |
232 | 232 | return Xml::openElement( 'tr' ) . |
233 | | - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-views', array( 'parseinline' ) ) ) . |
| 233 | + Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-views' )->parse() ) . |
234 | 234 | Xml::closeElement( 'tr' ) . |
235 | | - $this->formatRow( wfMsgExt( 'statistics-views-total', array( 'parseinline' ) ), |
| 235 | + $this->formatRow( $this->msg( 'statistics-views-total' )->parse(), |
236 | 236 | $this->getLanguage()->formatNum( $this->views ), |
237 | 237 | array ( 'class' => 'mw-statistics-views-total' ), 'statistics-views-total-desc' ) . |
238 | | - $this->formatRow( wfMsgExt( 'statistics-views-peredit', array( 'parseinline' ) ), |
| 238 | + $this->formatRow( $this->msg( 'statistics-views-peredit' )->parse(), |
239 | 239 | $this->getLanguage()->formatNum( sprintf( '%.2f', $this->edits ? |
240 | 240 | $this->views / $this->edits : 0 ) ), |
241 | 241 | array ( 'class' => 'mw-statistics-views-peredit' ) ); |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | ); |
264 | 264 | if( $res->numRows() > 0 ) { |
265 | 265 | $text .= Xml::openElement( 'tr' ); |
266 | | - $text .= Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-mostpopular', array( 'parseinline' ) ) ); |
| 266 | + $text .= Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-mostpopular' )->parse() ); |
267 | 267 | $text .= Xml::closeElement( 'tr' ); |
268 | 268 | foreach ( $res as $row ) { |
269 | 269 | $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); |
— | — | @@ -282,7 +282,7 @@ |
283 | 283 | return ''; |
284 | 284 | |
285 | 285 | $return = Xml::openElement( 'tr' ) . |
286 | | - Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-hooks', array( 'parseinline' ) ) ) . |
| 286 | + Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-hooks' )->parse() ) . |
287 | 287 | Xml::closeElement( 'tr' ); |
288 | 288 | |
289 | 289 | foreach( $stats as $name => $number ) { |