diff options
Diffstat (limited to 'en/community')
-rw-r--r-- | en/community/index.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/en/community/index.php b/en/community/index.php index d2d84b7af..994597015 100644 --- a/en/community/index.php +++ b/en/community/index.php @@ -47,10 +47,21 @@ include '../../lib/news.php'; <div class="col"> <section> <?php - if ((strpos($locale, 'en') === 0) || (_r('https://planet.mageia.org/en/') != 'https://planet.mageia.org/en/')) { - show_feed($locale, _r('News') . ' (' . _r('Planet') . ')', _r('https://planet.mageia.org/en/'), _r('https://planet.mageia.org/en/') . '?type=rss10', 9, null, true); - } else { - show_feed($locale, _r('News') . ' (' . _r('Blog') . ')', _r('https://blog.mageia.org/en/'), _r('https://blog.mageia.org/en/') . '?feed=rss', 9, null, true); + $loc_planet_url = _r('https://planet.mageia.org/en/'); + $loc_blog_url = _r('https://blog.mageia.org/en/'); + $fresh_blog_post_titles = prepare_fresh_blog_post_titles('https://planet.mageia.org/en/', 'https://blog.mageia.org/en/', $loc_planet_url, $loc_blog_url); + $loc_posts_title = $fresh_blog_post_titles[0]; + $fresh_loc_posts = $fresh_blog_post_titles[1]; + $num_fresh_loc_posts = $fresh_blog_post_titles[2]; + $eng_posts_title = $fresh_blog_post_titles[3]; + $fresh_eng_posts = $fresh_blog_post_titles[4]; + $num_fresh_eng_posts = count($fresh_eng_posts); + + if(0 != $num_fresh_loc_posts) { + show_feed($locale, _r('Localised news') . " ($loc_posts_title)", '', '', 0, null, true, null, $fresh_loc_posts); + } + if(0 != $num_fresh_eng_posts) { + show_feed($locale, _r('News in English') . " ($eng_posts_title)", '', '', 0, null, true, null, $fresh_eng_posts); } // don't work: //show_feed('Mageia MLs', '', 'https://ml.mageia.org/l/rss/active_lists?count=20&for=10'); |