From 5feae6f617b209aec50597cb89f89b46c5be83fb Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 13 Sep 2005 21:17:18 +0000 Subject: [PATCH] fixed some syndicated content bugs --- docs/changelog/6.x.x.txt | 5 +++++ lib/WebGUI/Asset/Wobject/SyndicatedContent.pm | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 2638916ef..d43af923a 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,3 +1,8 @@ +6.7.5 + - Fixed a syntax error in Syndicated Content. + - Fixed an infinite loop problem in Syndicated Content when no URLs were + specified. + 6.7.4 - fix [ 1279861 ] POD errors in 6.7.3 - fix [ 1287994 ] POD errors in 6.7.4 diff --git a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm index 0b5765cf3..8a4b36317 100644 --- a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm +++ b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -125,7 +125,7 @@ sub definition { icon=>'syndicatedContent.gif', tableName=>'SyndicatedContent', className=>'WebGUI::Asset::Wobject::SyndicatedContent', - properties=>%properties + properties=>\%properties }); return $class->SUPER::definition($definition); } @@ -235,7 +235,7 @@ sub _normalize_items { sub _get_rss_data { my $url = shift; - my $cache = WebGUI::Cache->new('url:' . $url, 'RSS'); + my $cache = WebGUI::Cache->new('url:' . $url, 'RSS'); my $rss_serial = $cache->get; my $rss = {}; if ($rss_serial) { @@ -483,6 +483,7 @@ sub view { my $maxHeadlines = $self->get('maxHeadlines') || 1000000; my @urls = split(/\s+/,$self->get('rssUrl')); + return $self->processTemplate({},$self->get('templateId')) unless (scalar(@urls)); my $title=$self->get('title'); #We came into this subroutine as @@ -506,7 +507,6 @@ sub view { #Construct the title for the link. _constructRSSHeadTitleLink(\%var,$title || $var{'channel.title'}); - if ($rssObject) { $self->_constructRSS($rssObject,\%var); my $rss=$rssObject->as_string;