From aec1333faab59d5de487ecee0da059449e9c21fd Mon Sep 17 00:00:00 2001
From: horfic <horfic@ispconfig3>
Date: Mon, 10 Jan 2011 08:29:51 -0500
Subject: [PATCH] *) Changed remote function sites_web_domain_add to allow readonly website to be created *) Forgot to add the entries for mailman in the main.cf of postfix

---
 interface/web/dashboard/lib/custom_menu.inc.php |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/interface/web/dashboard/lib/custom_menu.inc.php b/interface/web/dashboard/lib/custom_menu.inc.php
index 447a655..0effc49 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;
@@ -68,4 +73,4 @@
 
 $app->tpl->setLoop('news',$rows);
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1