- Added a attachment_thumbnail option to the CS RSS feed.

This commit is contained in:
JT Smith 2007-01-25 17:14:25 +00:00
parent 3e23558cec
commit b319535fd1
4 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,5 @@
7.3.8
- Added a attachment_thumbnail option to the CS RSS feed.
7.3.7
- Fixed a template variable rewriting problem with Template Toolkit.

View file

@ -1606,7 +1606,7 @@ sub newByUrl {
$url =~ s/\"//;
my $asset;
if ($url ne "") {
my ($id, $class) = $session->db->quickArray("select distinct asset.assetId, asset.className from assetData join asset using (assetId) where assetData.url = ?", [ $url ]);
my ($id, $class) = $session->db->quickArray("select asset.assetId, asset.className from assetData join asset using (assetId) where assetData.url = ? limit 1", [ $url ]);
if ($id ne "" || $class ne "") {
return WebGUI::Asset->new($session,$id, $class, $revisionDate);
} else {

View file

@ -689,6 +689,7 @@ SQL
push @{$attachmentLoop}, {
'attachment.url' => $storage->getUrl($file),
'attachment.path' => $storage->getPath($file),
'attachment_thumbnail' => $storage->getThumbnailUrl($file),
'attachment.length' => $storage->getFileSize($file),
};
}

View file

@ -718,6 +718,9 @@ our $HELP = {
{
'name' => 'attachmentLoop',
'variables' => [
{
'name' => 'attachment_thumbnail'
},
{
'name' => 'attachment.url'
},