Cleaning up FileUrl macro

This commit is contained in:
Wouter van Oijen 2006-07-23 09:14:34 +00:00
parent 2eaea55041
commit cfea8f573a

View file

@ -21,9 +21,11 @@ Package WebGUI::Macro::FileUrl
=head1 DESCRIPTION
Macro for displaying returning the file system URL to a File, Image or Snippet Asset,
Macro for returning the file system URL to a File or Image Asset,
identified by it's asset URL.
#-------------------------------------------------------------------
=head2 process ( url )
returns the file system URL if url is the URL for an Asset in the
@ -37,8 +39,6 @@ The URL to the Asset.
=cut
#-------------------------------------------------------------------
sub process {
my $session = shift;
my $url = shift;
@ -59,10 +59,8 @@ sub process {
return $i18n->get('no filename');
}
my $storage = WebGUI::Storage->get($session,$storageId);
return $storage->getUrl($asset->get("filename"));
return $storage->getUrl($filename);
}
1;