tbrehm
2010-07-08 a6904b08797359ac524df7804d8b383bf8f6d801
Show max. 10 news records on the dashboard.
1 files modified
15 ■■■■■ changed files
interface/web/dashboard/lib/custom_menu.inc.php 15 ●●●●● patch | view | raw | blame | history
interface/web/dashboard/lib/custom_menu.inc.php
@@ -46,14 +46,19 @@
        $items = $app->simplepie->get_items();
        $rows = array();
        $n = 1;
        foreach ($items as $item)
        {
            $rows[] = array('title' => $item->get_title(),
                            'link' => $item->get_link(),
                            'content' => $item->get_content(),
                            'date' => $item->get_date('Y-m-d')
                            );
            //* We want to show only the first 10 news records
            if($n <= 10) {
                $rows[] = array('title' => $item->get_title(),
                                'link' => $item->get_link(),
                                'content' => $item->get_content(),
                                'date' => $item->get_date('Y-m-d')
                                );
            }
            $n++;
        }
        
        $_SESSION['s']['rss_news'] = $rows;