fixed the thumbnail macro

added the new ldap icon to the admin console
This commit is contained in:
JT Smith 2005-05-04 14:34:17 +00:00
parent a8a38b55dc
commit d28bc13924
3 changed files with 18 additions and 8 deletions

View file

@ -197,7 +197,7 @@ sub getAdminFunction {
id=>"ldapconnections",
namespace=>"WebGUI"
},
icon=>"databases.gif",
icon=>"ldap.gif",
op=>"listLDAPLinks",
group=>"3"
},

View file

@ -11,15 +11,15 @@ package WebGUI::Macro::Thumbnail;
#-------------------------------------------------------------------
use strict;
use WebGUI::Collateral;
use WebGUI::Asset::File::Image;
use WebGUI::Macro;
use WebGUI::Session;
#-------------------------------------------------------------------
sub process {
my @param = WebGUI::Macro::getParams($_[0]);
if (my $collateral = WebGUI::Collateral->find($param[0])) {
return $collateral->getThumbnail;
my ($url) = WebGUI::Macro::getParams(shift);
if (my $image = WebGUI::Asset::File::Image->newByUrl($url)) {
return $image->getThumbnailUrl;
} else {
return undef;
}