We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb5ebb5 commit a6904b0Copy full SHA for a6904b0
interface/web/dashboard/lib/custom_menu.inc.php
@@ -46,14 +46,19 @@
46
$items = $app->simplepie->get_items();
47
48
$rows = array();
49
+ $n = 1;
50
51
foreach ($items as $item)
52
{
- $rows[] = array('title' => $item->get_title(),
53
- 'link' => $item->get_link(),
54
- 'content' => $item->get_content(),
55
- 'date' => $item->get_date('Y-m-d')
56
- );
+ //* We want to show only the first 10 news records
+ if($n <= 10) {
+ $rows[] = array('title' => $item->get_title(),
+ 'link' => $item->get_link(),
57
+ 'content' => $item->get_content(),
58
+ 'date' => $item->get_date('Y-m-d')
59
+ );
60
+ }
61
+ $n++;
62
}
63
64
$_SESSION['s']['rss_news'] = $rows;
0 commit comments