Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | /** |
6 | 6 | * Returns the list of feeds |
7 | 7 | * |
8 | | - * @param $langCode string||bool Code of language to use or false if default |
| 8 | + * @param $langCode string|bool Code of language to use or false if default |
9 | 9 | * @return array Feeds in format of 'name' => array of FeedItem |
10 | 10 | */ |
11 | 11 | public static function getFeeds( $langCode ) { |
— | — | @@ -270,6 +270,7 @@ |
271 | 271 | } |
272 | 272 | |
273 | 273 | public function init() { |
| 274 | + global $wgLanguageCode; |
274 | 275 | if ( $this->title !== false ) { |
275 | 276 | return; |
276 | 277 | } |
— | — | @@ -278,6 +279,14 @@ |
279 | 280 | $this->description = $this->msg( $this->options['description'] )->text(); |
280 | 281 | $pageMsg = $this->msg( $this->options['page'] )->params( $this->language->getCode() ); |
281 | 282 | if ( $pageMsg->isDisabled() ) { |
| 283 | + // fall back manually, messages can be existent but empty |
| 284 | + if ( $this->language->getCode() != $wgLanguageCode ) { |
| 285 | + $pageMsg = wfMessage( $this->options['page'] ) |
| 286 | + ->params( $this->language->getCode() ) |
| 287 | + ->inContentLanguage(); |
| 288 | + } |
| 289 | + } |
| 290 | + if ( $pageMsg->isDisabled() ) { |
282 | 291 | return; |
283 | 292 | } |
284 | 293 | $this->page = $pageMsg->plain(); |