Skip to content
Snippets Groups Projects
Commit a6904b08 authored by tbrehm's avatar tbrehm
Browse files

Show max. 10 news records on the dashboard.

parent fb5ebb5a
No related branches found
No related tags found
2 merge requests!46Master,!21Master
......@@ -46,14 +46,19 @@ if($misc_config['dashboard_atom_url'] != '') {
$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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment