From b90c79f4c4008798b0eaa1a4b89d0a5e3acf60db Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Tue, 14 Aug 2007 21:14:13 +0000 Subject: [PATCH] Fixed a bug which would display the asset title twice when there was aggregate content --- lib/WebGUI/Asset/Wobject/SyndicatedContent.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm index 245cfdde9..fa7e7d9d0 100644 --- a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm +++ b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -134,7 +134,7 @@ sub appendChoppedDescriptionTemplateVars { $item->{"descriptionFirstSentence"} =~ s/^(.*?\.).*/$1/s; } -#------------------------------------------------------------------- +#------------------------------------------------------------------- =head2 definition ( definition ) @@ -328,7 +328,7 @@ sub _normalize_items { $item->{description} =~ s/'/\'/g; $item->{category} = [$item->{category}] if ref $item->{category} ne 'ARRAY'; - appendChoppedDescriptionTemplateVars($item); + appendChoppedDescriptionTemplateVars($item); } } @@ -666,17 +666,13 @@ sub view { return $self->processTemplate(\%var,undef,$self->{_viewTemplate}); } - if(@$rss_feeds > 1){ - #If there is more than one (valid) feed in this wobject, put in the wobject description info. - $var{'channel.title'} = $title; - $var{'channel.description'} = $self->get('description'); - } else { + if(@$rss_feeds == 1){ #One feed. Put in the info from the feed. $var{'channel.title'} = $rss_feeds->[0]->{channel}->{title} || $title; $var{'channel.link'} = $rss_feeds->[0]->{channel}->{link}; $var{'channel.description'} = $rss_feeds->[0]->{channel}->{description}; } - + $self->_createRSSURLs(\%var); $var{item_loop} = $item_loop;