From d2212dda734bb8c4b899faab848fa1bd7c1bf66e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 19 Sep 2010 08:01:47 -0400
Subject: [PATCH] Fixed bug in maildirmake function: http://www.howtoforge.com/forums/showthread.php?t=48890

---
 interface/web/dashboard/lib/custom_menu.inc.php |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/interface/web/dashboard/lib/custom_menu.inc.php b/interface/web/dashboard/lib/custom_menu.inc.php
index 447a655..e75fc75 100644
--- a/interface/web/dashboard/lib/custom_menu.inc.php
+++ b/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;

--
Gitblit v1.9.1