From cfea8f573a7eb4ad3a257aaab0c435fdd4f8f425 Mon Sep 17 00:00:00 2001 From: Wouter van Oijen Date: Sun, 23 Jul 2006 09:14:34 +0000 Subject: [PATCH] Cleaning up FileUrl macro --- lib/WebGUI/Macro/FileUrl.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/WebGUI/Macro/FileUrl.pm b/lib/WebGUI/Macro/FileUrl.pm index 13f87eddf..869d0eae7 100644 --- a/lib/WebGUI/Macro/FileUrl.pm +++ b/lib/WebGUI/Macro/FileUrl.pm @@ -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; - -