more formatting
This commit is contained in:
parent
78fb7ef8db
commit
cb367a8020
1 changed files with 19 additions and 18 deletions
|
|
@ -684,28 +684,29 @@ SQL
|
|||
'link' => $postUrl, guid => $postUrl,
|
||||
description => $post->get('synopsis'),
|
||||
pubDate => $datetime->epochToMail($post->get('dateUpdated')),
|
||||
attachmentLoop => do {
|
||||
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 {
|
||||
[]
|
||||
}
|
||||
}
|
||||
attachmentLoop => $self->getRssItemsAttachments($post),
|
||||
})
|
||||
} @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 {
|
||||
my $self = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue