* More fixes to misuse of wfmsg functions
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 9 Jul 2008 09:17:20 +0000 (09:17 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 9 Jul 2008 09:17:20 +0000 (09:17 +0000)
* Should fix bug 14767

includes/Pager.php
includes/specials/SpecialNewimages.php

index 23591b2..62c4e55 100644 (file)
@@ -486,10 +486,6 @@ abstract class IndexPager implements Pager {
  * @ingroup Pager
  */
 abstract class AlphabeticPager extends IndexPager {
-       function __construct() {
-               parent::__construct();
-       }
-
        /**
         * Shamelessly stolen bits from ReverseChronologicalPager,
         * didn't want to do class magic as may be still revamped
@@ -501,11 +497,12 @@ abstract class AlphabeticPager extends IndexPager {
                        return $this->mNavigationBar;
                }
 
+               $opts = array( 'parsemag', 'escapenoentities' );
                $linkTexts = array(
-                       'prev' => wfMsgHtml( 'prevn', $wgLang->formatNum( $this->mLimit ) ),
-                       'next' => wfMsgHtml( 'nextn', $wgLang->formatNum($this->mLimit ) ),
-                       'first' => wfMsgHtml( 'page_first' ),
-                       'last' => wfMsgHtml( 'page_last' )
+                       'prev' => wfMsgExt( 'prevn', $opts, $wgLang->formatNum( $this->mLimit ) ),
+                       'next' => wfMsgExt( 'nextn', $opts, $wgLang->formatNum($this->mLimit ) ),
+                       'first' => wfMsgExt( 'page_first', $opts ),
+                       'last' => wfMsgExt( 'page_last', $opts )
                );
 
                $pagingLinks = $this->getPagingLinks( $linkTexts );
index 5fd37e8..e57f6fc 100644 (file)
@@ -184,12 +184,14 @@ function wfSpecialNewimages( $par, $specialPage ) {
        $botLink = $sk->makeKnownLinkObj($titleObj, wfMsgHtml( 'showhidebots', 
                ($hidebots ? wfMsgHtml('show') : wfMsgHtml('hide'))),'hidebots='.($hidebots ? '0' : '1').$searchpar);
 
-       $prevLink = wfMsgHtml( 'prevn', $wgLang->formatNum( $limit ) );
+
+       $opts = array( 'parsemag', 'escapenoentities' );
+       $prevLink = wfMsgExt( 'prevn', $opts, $wgLang->formatNum( $limit ) );
        if( $firstTimestamp && $firstTimestamp != $latestTimestamp ) {
                $prevLink = $sk->makeKnownLinkObj( $titleObj, $prevLink, 'from=' . $firstTimestamp . $botpar . $searchpar );
        }
 
-       $nextLink = wfMsgHtml( 'nextn', $wgLang->formatNum( $limit ) );
+       $nextLink = wfMsgExt( 'nextn', $opts, $wgLang->formatNum( $limit ) );
        if( $shownImages > $limit && $lastTimestamp ) {
                $nextLink = $sk->makeKnownLinkObj( $titleObj, $nextLink, 'until=' . $lastTimestamp.$botpar.$searchpar );
        }