Index: trunk/phase3/includes/specials/SpecialActiveusers.php |
— | — | @@ -131,13 +131,9 @@ |
132 | 132 | $groups = $lang->commaList( $list ); |
133 | 133 | |
134 | 134 | $item = $lang->specialList( $ulinks, $groups ); |
135 | | - $count = wfMsgExt( 'activeusers-count', |
136 | | - array( 'parsemag' ), |
137 | | - $lang->formatNum( $row->recentedits ), |
138 | | - $userName, |
139 | | - $lang->formatNum( $this->RCMaxAge ) |
140 | | - ); |
141 | | - $blocked = $row->blocked ? ' ' . wfMsgExt( 'listusers-blocked', array( 'parsemag' ), $userName ) : ''; |
| 135 | + $count = $this->msg( 'activeusers-count' )->numParams( $row->recentedits ) |
| 136 | + ->params( $userName )->numParams( $this->RCMaxAge )->escaped(); |
| 137 | + $blocked = $row->blocked ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : ''; |
142 | 138 | |
143 | 139 | return Html::rawElement( 'li', array(), "{$item} [{$count}]{$blocked}" ); |
144 | 140 | } |
— | — | @@ -149,16 +145,19 @@ |
150 | 146 | $limit = $this->mLimit ? Html::hidden( 'limit', $this->mLimit ) : ''; |
151 | 147 | |
152 | 148 | $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); # Form tag |
153 | | - $out .= Xml::fieldset( wfMsg( 'activeusers' ) ) . "\n"; |
| 149 | + $out .= Xml::fieldset( $this->msg( 'activeusers' )->text() ) . "\n"; |
154 | 150 | $out .= Html::hidden( 'title', $self->getPrefixedDBkey() ) . $limit . "\n"; |
155 | 151 | |
156 | | - $out .= Xml::inputLabel( wfMsg( 'activeusers-from' ), 'username', 'offset', 20, $this->requestedUser ) . '<br />';# Username field |
| 152 | + $out .= Xml::inputLabel( $this->msg( 'activeusers-from' )->text(), |
| 153 | + 'username', 'offset', 20, $this->requestedUser ) . '<br />';# Username field |
157 | 154 | |
158 | | - $out .= Xml::checkLabel( wfMsg('activeusers-hidebots'), 'hidebots', 'hidebots', $this->opts->getValue( 'hidebots' ) ); |
| 155 | + $out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(), |
| 156 | + 'hidebots', 'hidebots', $this->opts->getValue( 'hidebots' ) ); |
159 | 157 | |
160 | | - $out .= Xml::checkLabel( wfMsg('activeusers-hidesysops'), 'hidesysops', 'hidesysops', $this->opts->getValue( 'hidesysops' ) ) . '<br />'; |
| 158 | + $out .= Xml::checkLabel( $this->msg( 'activeusers-hidesysops' )->text(), |
| 159 | + 'hidesysops', 'hidesysops', $this->opts->getValue( 'hidesysops' ) ) . '<br />'; |
161 | 160 | |
162 | | - $out .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n";# Submit button and form bottom |
| 161 | + $out .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n";# Submit button and form bottom |
163 | 162 | $out .= Xml::closeElement( 'fieldset' ); |
164 | 163 | $out .= Xml::closeElement( 'form' ); |
165 | 164 | |
— | — | @@ -189,25 +188,25 @@ |
190 | 189 | $this->setHeaders(); |
191 | 190 | $this->outputHeader(); |
192 | 191 | |
| 192 | + $out = $this->getOutput(); |
| 193 | + $out->wrapWikiMsg( "<div class='mw-activeusers-intro'>\n$1\n</div>", |
| 194 | + array( 'activeusers-intro', $this->getLang()->formatNum( $wgActiveUserDays ) ) ); |
| 195 | + |
193 | 196 | $up = new ActiveUsersPager( $this->getContext() ); |
194 | 197 | |
195 | 198 | # getBody() first to check, if empty |
196 | 199 | $usersbody = $up->getBody(); |
197 | 200 | |
198 | | - $s = Html::rawElement( 'div', array( 'class' => 'mw-activeusers-intro' ), |
199 | | - wfMsgExt( 'activeusers-intro', array( 'parsemag', 'escape' ), $this->getLang()->formatNum( $wgActiveUserDays ) ) |
200 | | - ); |
201 | | - |
202 | | - $s .= $up->getPageHeader(); |
203 | | - if( $usersbody ) { |
204 | | - $s .= $up->getNavigationBar(); |
205 | | - $s .= Html::rawElement( 'ul', array(), $usersbody ); |
206 | | - $s .= $up->getNavigationBar(); |
| 201 | + $out->addHTML( $up->getPageHeader() ); |
| 202 | + if ( $usersbody ) { |
| 203 | + $out->addHTML( |
| 204 | + $up->getNavigationBar() . |
| 205 | + Html::rawElement( 'ul', array(), $usersbody ) . |
| 206 | + $up->getNavigationBar() |
| 207 | + ); |
207 | 208 | } else { |
208 | | - $s .= Html::element( 'p', array(), wfMsg( 'activeusers-noresult' ) ); |
| 209 | + $out->addWikiMsg( 'activeusers-noresult' ); |
209 | 210 | } |
210 | | - |
211 | | - $this->getOutput()->addHTML( $s ); |
212 | 211 | } |
213 | 212 | |
214 | 213 | } |