Export related assets

This commit is contained in:
Paul Driver 2011-04-04 16:13:58 -05:00
parent 5c20e9c0be
commit 76e9693f4b
5 changed files with 91 additions and 3 deletions

View file

@ -240,6 +240,26 @@ sub exportAssetData {
#-------------------------------------------------------------------
=head2 exportGetRelatedAssetIds
Overriden to include any topics in which this story would appear.
=cut
sub exportGetRelatedAssetIds {
my $self = shift;
my $rel = $self->SUPER::exportGetRelatedAssetIds(@_);
push @$rel, @{
WebGUI::Keyword->new($self->session)->getMatchingAssets({
keywords => WebGUI::Keyword::string2list($self->get('keywords')),
isa => 'WebGUI::Asset::Wobject::StoryTopic',
})
};
return $rel;
}
#-------------------------------------------------------------------
=head2 formatDuration ( $lastUpdated )
Format the time since this story was last updated. If it is longer than 1 week, then