Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php |
— | — | @@ -269,8 +269,7 @@ |
270 | 270 | } |
271 | 271 | |
272 | 272 | protected function listItem( $row, $nt, $notClose = false ) { |
273 | | - global $wgLang; |
274 | | - $dirmark = $wgLang->getDirMark(); |
| 273 | + $dirmark = $this->getLang()->getDirMark(); |
275 | 274 | |
276 | 275 | # local message cache |
277 | 276 | static $msgcache = null; |
— | — | @@ -346,11 +345,9 @@ |
347 | 346 | } |
348 | 347 | |
349 | 348 | function getPrevNext( $prevId, $nextId ) { |
350 | | - global $wgLang; |
351 | 349 | $currentLimit = $this->opts->getValue( 'limit' ); |
352 | | - $fmtLimit = $wgLang->formatNum( $currentLimit ); |
353 | | - $prev = wfMsgExt( 'whatlinkshere-prev', array( 'parsemag', 'escape' ), $fmtLimit ); |
354 | | - $next = wfMsgExt( 'whatlinkshere-next', array( 'parsemag', 'escape' ), $fmtLimit ); |
| 350 | + $prev = wfMessage( 'whatlinkshere-prev' )->numParams( $currentLimit )->escaped(); |
| 351 | + $next = wfMessage( 'whatlinkshere-next' )->numParams( $currentLimit )->escaped(); |
355 | 352 | |
356 | 353 | $changed = $this->opts->getChangedValues(); |
357 | 354 | unset($changed['target']); // Already in the request title |
— | — | @@ -365,13 +362,14 @@ |
366 | 363 | } |
367 | 364 | |
368 | 365 | $limitLinks = array(); |
| 366 | + $lang = $this->getLang(); |
369 | 367 | foreach ( $this->limits as $limit ) { |
370 | | - $prettyLimit = $wgLang->formatNum( $limit ); |
| 368 | + $prettyLimit = htmlspecialchars( $lang->formatNum( $limit ) ); |
371 | 369 | $overrides = array( 'limit' => $limit ); |
372 | 370 | $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $changed, $overrides ) ); |
373 | 371 | } |
374 | 372 | |
375 | | - $nums = $wgLang->pipeList( $limitLinks ); |
| 373 | + $nums = $lang->pipeList( $limitLinks ); |
376 | 374 | |
377 | 375 | return wfMsgHtml( 'viewprevnext', $prev, $next, $nums ); |
378 | 376 | } |
— | — | @@ -425,7 +423,6 @@ |
426 | 424 | * @return string HTML fieldset and filter panel with the show/hide links |
427 | 425 | */ |
428 | 426 | function getFilterPanel() { |
429 | | - global $wgLang; |
430 | 427 | $show = wfMsgHtml( 'show' ); |
431 | 428 | $hide = wfMsgHtml( 'hide' ); |
432 | 429 | |
— | — | @@ -445,6 +442,6 @@ |
446 | 443 | $overrides = array( $type => !$chosen ); |
447 | 444 | $links[] = wfMsgHtml( "whatlinkshere-{$type}", $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ) ); |
448 | 445 | } |
449 | | - return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) ); |
| 446 | + return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $this->getLang()->pipeList( $links ) ); |
450 | 447 | } |
451 | 448 | } |