more formatting

This commit is contained in:
JT Smith 2007-01-17 17:44:07 +00:00
parent 78fb7ef8db
commit cb367a8020

View file

@ -684,28 +684,29 @@ SQL
'link' => $postUrl, guid => $postUrl, 'link' => $postUrl, guid => $postUrl,
description => $post->get('synopsis'), description => $post->get('synopsis'),
pubDate => $datetime->epochToMail($post->get('dateUpdated')), pubDate => $datetime->epochToMail($post->get('dateUpdated')),
attachmentLoop => do { attachmentLoop => $self->getRssItemsAttachments($post),
if ($post->get('storageId')) {
my $storage = $post->getStorageLocation;
#returns this
[
map {
{
'attachment.url' => $storage->getUrl($_),
'attachment.path' => $storage->getPath($_),
'attachment.length' => $storage->getFileSize($_)
}
} @{$storage->getFiles}
]
}
else {
[]
}
}
}) })
} @postIds; } @postIds;
} }
#-------------------------------------------------------------------
sub getRssItemsAttachments {
my $self = shift;
my $post = shift;
if ($post->get('storageId')) {
my $storage = $post->getStorageLocation;
my @attachments = map {
{
'attachment.url' => $storage->getUrl($_),
'attachment.path' => $storage->getPath($_),
'attachment.length' => $storage->getFileSize($_)
}
} @{$storage->getFiles};
return \@attachments;
}
return [];
}
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub getEditTabs { sub getEditTabs {
my $self = shift; my $self = shift;