r110183 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110182‎ | r110183 | r110184 >
Date:22:58, 27 January 2012
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Fix Commons config. Yay to $wgConf!
Modified paths:
  • /trunk/extensions/FeaturedFeeds/FeaturedFeedsWMF.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FeaturedFeeds/FeaturedFeedsWMF.php
@@ -34,36 +34,35 @@
3535 );
3636 switch ( $site ) {
3737 case 'wikipedia':
38 - $feeds += array(
39 - 'featured' => array(
40 - 'page' => 'ffeed-featured-page',
41 - 'title' => 'ffeed-featured-title',
42 - 'short-title' => 'ffeed-featured-short-title',
43 - 'description' => 'ffeed-featured-desc',
44 - 'entryName' => 'ffeed-featured-entry',
45 - ),
46 - 'onthisday' => array(
47 - 'page' => 'ffeed-onthisday-page',
48 - 'title' => 'ffeed-onthisday-title',
49 - 'short-title' => 'ffeed-onthisday-short-title',
50 - 'description' => 'ffeed-onthisday-desc',
51 - 'entryName' => 'ffeed-onthisday-entry',
52 - ),
53 - 'dyk' => array( // Did you know?
54 - 'page' => 'ffeed-dyk-page',
55 - 'title' => 'ffeed-dyk-title',
56 - 'short-title' => 'ffeed-dyk-short-title',
57 - 'description' => 'ffeed-dyk-desc',
58 - 'entryName' => 'ffeed-dyk-entry',
59 - ),
60 - );
6138 $feeds += $media;
 39+ if ( $lang == 'commons' ) {
 40+ $feeds['potd']['inUserLanguage'] = $feeds['motd']['inUserLanguage'] = true;
 41+ } else {
 42+ $feeds += array(
 43+ 'featured' => array(
 44+ 'page' => 'ffeed-featured-page',
 45+ 'title' => 'ffeed-featured-title',
 46+ 'short-title' => 'ffeed-featured-short-title',
 47+ 'description' => 'ffeed-featured-desc',
 48+ 'entryName' => 'ffeed-featured-entry',
 49+ ),
 50+ 'onthisday' => array(
 51+ 'page' => 'ffeed-onthisday-page',
 52+ 'title' => 'ffeed-onthisday-title',
 53+ 'short-title' => 'ffeed-onthisday-short-title',
 54+ 'description' => 'ffeed-onthisday-desc',
 55+ 'entryName' => 'ffeed-onthisday-entry',
 56+ ),
 57+ 'dyk' => array( // Did you know?
 58+ 'page' => 'ffeed-dyk-page',
 59+ 'title' => 'ffeed-dyk-title',
 60+ 'short-title' => 'ffeed-dyk-short-title',
 61+ 'description' => 'ffeed-dyk-desc',
 62+ 'entryName' => 'ffeed-dyk-entry',
 63+ ),
 64+ );
 65+ }
6266 break;
63 - case 'commons':
64 - $feeds += $media;
65 - $feeds['potd']['inUserLanguage'] = true;
66 - $feeds['motd']['inUserLanguage'] = true;
67 - break;
6867 case 'wikiquote':
6968 $feeds['qotd'] = array( // Quote of the Day
7069 'page' => 'ffeed-qotd-page',

Comments

#Comment by Reedy (talk | contribs)   23:33, 27 January 2012

Fuck yeah site hacks

#Comment by Krinkle (talk | contribs)   02:28, 27 February 2012

This wasn't merged yet (I see no follow-ups). If that is the case, do we still need it? 1.19 was branched after this so it'll be in 1.19.0 and already is in 1.19wmf1. Untagging for now, feel free to re-tag.

Status & tagging log