Index: trunk/extensions/FeaturedFeeds/FeaturedFeedsWMF.php |
— | — | @@ -34,36 +34,35 @@ |
35 | 35 | ); |
36 | 36 | switch ( $site ) { |
37 | 37 | 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 | | - ); |
61 | 38 | $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 | + } |
62 | 66 | break; |
63 | | - case 'commons': |
64 | | - $feeds += $media; |
65 | | - $feeds['potd']['inUserLanguage'] = true; |
66 | | - $feeds['motd']['inUserLanguage'] = true; |
67 | | - break; |
68 | 67 | case 'wikiquote': |
69 | 68 | $feeds['qotd'] = array( // Quote of the Day |
70 | 69 | 'page' => 'ffeed-qotd-page', |