[Vtigercrm-commits] [vtiger-commits] r6321 - /vtigercrm/trunk/modules/Rss/Rss.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 23 07:51:32 EDT 2006
Author: richie
Date: Tue May 23 05:51:25 2006
New Revision: 6321
Log:
Fixes #256. Added Magpie RSS support
Modified:
vtigercrm/trunk/modules/Rss/Rss.php
Modified: vtigercrm/trunk/modules/Rss/Rss.php
==============================================================================
--- vtigercrm/trunk/modules/Rss/Rss.php (original)
+++ vtigercrm/trunk/modules/Rss/Rss.php Tue May 23 05:51:25 2006
@@ -18,10 +18,12 @@
require_once('include/database/PearDatabase.php');
//require_once($theme_path."layout_utils.php");
// Require the xmlParser class
-require_once('include/feedParser/xmlParser.php');
+//require_once('include/feedParser/xmlParser.php');
// Require the feedParser class
-require_once('include/feedParser/feedParser.php');
+//require_once('include/feedParser/feedParser.php');
+
+require_once('include/magpierss/rss_fetch.inc');
class vtigerRSS extends CRMEntity
{
@@ -39,24 +41,24 @@
function setRSSUrl($url)
{
global $cache_dir;
- $this->rss = new feedParser();
+ $this->rss = fetch_rss($url);
// Read in our sample feed file
- $data = @implode("", at file($url));
+ //$data = @implode("", at file($url));
// Tell feedParser to parse the data
- $info = $this->rss->parseFeed($data);
+ $info = $this->rss->items;
if(isset($info))
{
- $this->rss_object = $info["channel"];
+ $this->rss_object = $info;
}else
{
return false;
}
- if(isset($this->rss_object))
- {
- $this->rss_title = $this->rss_object["title"];
- $this->rss_link = $this->rss_object["link"];
- $this->rss_object = $info["item"];
+ if(isset($this->rss))
+ {
+ $this->rss_title = $this->rss->channel["title"];
+ $this->rss_link = $this->rss->channel["link"];
+ $this->rss_object = $info;
return true;
}else
{
More information about the vtigercrm-commits
mailing list