From 249fc8b1c8022fabcf6d704b280aa6b33f05a21c Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 05 Oct 2010 15:03:52 -0400
Subject: [PATCH] Fixed: FS#1350 - Minor bugs in monitor and dashboard.

---
 interface/web/dashboard/lib/custom_menu.inc.php |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/interface/web/dashboard/lib/custom_menu.inc.php b/interface/web/dashboard/lib/custom_menu.inc.php
index 447a655..8dea3d0 100644
--- a/interface/web/dashboard/lib/custom_menu.inc.php
+++ b/interface/web/dashboard/lib/custom_menu.inc.php
@@ -40,20 +40,25 @@
 
 	if(!isset($_SESSION['s']['rss_news'])) {
 		
-		$app->simplepie->set_feed_url('http://www.ispconfig.org/atom');
+		$app->simplepie->set_feed_url($misc_config['dashboard_atom_url']);
 		$app->simplepie->enable_cache(false);
 		$app->simplepie->init();
 		$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