r37376 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37375‎ | r37376 | r37377 >
Date:09:17, 9 July 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* More fixes to misuse of wfmsg functions
* Should fix bug 14767
Modified paths:
  • /trunk/phase3/includes/Pager.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewimages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewimages.php
@@ -184,12 +184,14 @@
185185 $botLink = $sk->makeKnownLinkObj($titleObj, wfMsgHtml( 'showhidebots',
186186 ($hidebots ? wfMsgHtml('show') : wfMsgHtml('hide'))),'hidebots='.($hidebots ? '0' : '1').$searchpar);
187187
188 - $prevLink = wfMsgHtml( 'prevn', $wgLang->formatNum( $limit ) );
 188+
 189+ $opts = array( 'parsemag', 'escapenoentities' );
 190+ $prevLink = wfMsgExt( 'prevn', $opts, $wgLang->formatNum( $limit ) );
189191 if( $firstTimestamp && $firstTimestamp != $latestTimestamp ) {
190192 $prevLink = $sk->makeKnownLinkObj( $titleObj, $prevLink, 'from=' . $firstTimestamp . $botpar . $searchpar );
191193 }
192194
193 - $nextLink = wfMsgHtml( 'nextn', $wgLang->formatNum( $limit ) );
 195+ $nextLink = wfMsgExt( 'nextn', $opts, $wgLang->formatNum( $limit ) );
194196 if( $shownImages > $limit && $lastTimestamp ) {
195197 $nextLink = $sk->makeKnownLinkObj( $titleObj, $nextLink, 'until=' . $lastTimestamp.$botpar.$searchpar );
196198 }
Index: trunk/phase3/includes/Pager.php
@@ -486,10 +486,6 @@
487487 * @ingroup Pager
488488 */
489489 abstract class AlphabeticPager extends IndexPager {
490 - function __construct() {
491 - parent::__construct();
492 - }
493 -
494490 /**
495491 * Shamelessly stolen bits from ReverseChronologicalPager,
496492 * didn't want to do class magic as may be still revamped
@@ -501,11 +497,12 @@
502498 return $this->mNavigationBar;
503499 }
504500
 501+ $opts = array( 'parsemag', 'escapenoentities' );
505502 $linkTexts = array(
506 - 'prev' => wfMsgHtml( 'prevn', $wgLang->formatNum( $this->mLimit ) ),
507 - 'next' => wfMsgHtml( 'nextn', $wgLang->formatNum($this->mLimit ) ),
508 - 'first' => wfMsgHtml( 'page_first' ),
509 - 'last' => wfMsgHtml( 'page_last' )
 503+ 'prev' => wfMsgExt( 'prevn', $opts, $wgLang->formatNum( $this->mLimit ) ),
 504+ 'next' => wfMsgExt( 'nextn', $opts, $wgLang->formatNum($this->mLimit ) ),
 505+ 'first' => wfMsgExt( 'page_first', $opts ),
 506+ 'last' => wfMsgExt( 'page_last', $opts )
510507 );
511508
512509 $pagingLinks = $this->getPagingLinks( $linkTexts );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r37375* Fix some misuse of message functions...nikerabbit09:10, 9 July 2008

Status & tagging log