r108134 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108133‎ | r108134 | r108135 >
Date:10:55, 5 January 2012
Author:maxsem
Status:ok
Tags:
Comment:
Allow specifying feed page in user language, too - if allowed
Modified paths:
  • /trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php
@@ -82,15 +82,14 @@
8383 foreach ( $feedDefs as $name => $opts ) {
8484 $feed = array( 'name' => $name );
8585
86 - $pageMsg = wfMessage( $opts['page'] )->inContentLanguage();
 86+ $feed['inUserLanguage'] = $opts['inUserLanguage'];
 87+ $lang = $opts['inUserLanguage'] ? $requestedLang : $wgContLang;
 88+ $feed['language'] = $lang->getCode();
 89+ $pageMsg = wfMessage( $opts['page'] )->inLanguage( $lang );
8790 if ( $pageMsg->isDisabled() ) {
8891 continue;
8992 }
9093 $page = $pageMsg->plain();
91 -
92 - $feed['inUserLanguage'] = $opts['inUserLanguage'];
93 - $lang = $opts['inUserLanguage'] ? $requestedLang : $wgContLang;
94 - $feed['language'] = $lang->getCode();
9594 $feed['title'] = wfMessage( $opts['title'] )->inLanguage( $lang )->text();
9695 $feed['description'] = wfMessage( $opts['description'] )->inLanguage( $lang )->text();
9796 $entryName = wfMessage( $opts['entryName'] )->inLanguage( $lang )->plain();

Status & tagging log