r91338 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91337‎ | r91338 | r91339 >
Date:00:19, 2 July 2011
Author:robin
Status:ok
Tags:
Comment:
* Use wgLang->formatNum for number of replies (reported by Translatewiki user Ebraminio)
* Set correct page content language (wgLang) for Thread pages, follow-up to r91182
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Dispatch.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Dispatch.php
@@ -208,7 +208,9 @@
209209 global $wgRequest;
210210 $method = $wgRequest->getVal( 'lqt_method' );
211211 $oldid = $wgRequest->getVal( 'lqt_oldid' );
212 - if( $method == 'diff' ) {
 212+ if( $title->getNamespace() == NS_LQT_THREAD ) {
 213+ $pageLang = $wgLang;
 214+ } elseif( $method == 'diff' ) {
213215 # the diff contains the wikitext, which is in the content language
214216 return true;
215217 } elseif ( $method == 'talkpage_history' || $method == 'thread_history' || $oldid != '' ) {
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -147,7 +147,7 @@
148148 Threads::stripHTML( $thread->formattedSubject() ) );
149149 $row .= Xml::tags( 'td', null, $subject );
150150
151 - $row .= Xml::element( 'td', null, $thread->replyCount() );
 151+ $row .= Xml::element( 'td', null, $wgLang->formatNum( $thread->replyCount() ) );
152152
153153 $timestamp = $wgLang->timeanddate( $thread->modified(), true );
154154 $row .= Xml::element( 'td', null, $timestamp );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91182Set the right page content language (better LTR/RTL directionality support)robin17:00, 30 June 2011

Status & tagging log