From 9389ef50eefb487130732444d808a18211329c49 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Fri, 22 Aug 2008 10:54:31 -0500 Subject: [PATCH] Fix itemtype image problem in moremember.pl Signed-off-by: Galen Charlton --- C4/Koha.pm | 13 +------------ members/moremember.pl | 2 +- t/lib/KohaTest/Koha.pm | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index a32062a2f2..8e5b4c7b2f 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -43,7 +43,6 @@ BEGIN { &getFacets &displayServers &getnbpages - &getitemtypeimagesrcfromurl &get_infos_of &get_notforloan_label_of &getitemtypeimagedir @@ -442,21 +441,11 @@ sub getitemtypeinfo { $sth->execute($itemtype); my $res = $sth->fetchrow_hashref; - $res->{imageurl} = getitemtypeimagesrcfromurl( $res->{imageurl} ); + $res->{imageurl} = getitemtypeimagelocation( 'intranet', $res->{imageurl} ); return $res; } -sub getitemtypeimagesrcfromurl { - my ($imageurl) = @_; - - if ( defined $imageurl and $imageurl !~ m/^http/ ) { - $imageurl = getitemtypeimagesrc() . '/' . $imageurl; - } - - return $imageurl; -} - =head2 getitemtypeimagedir =over diff --git a/members/moremember.pl b/members/moremember.pl index ee5422f533..87a5659182 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -240,7 +240,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { my $itemtypeinfo = getitemtypeinfo($itemtype); $row{'itemtype_description'} = $itemtypeinfo->{description}; - $row{'itemtype_image'} = getitemtypelocation( 'opac', $itemtypeinfo->{imageurl} ); + $row{'itemtype_image'} = $itemtypeinfo->{imageurl}; $row{'charge'} = sprintf( "%.2f", $charge ); diff --git a/t/lib/KohaTest/Koha.pm b/t/lib/KohaTest/Koha.pm index c8a19822d8..c1773d955d 100644 --- a/t/lib/KohaTest/Koha.pm +++ b/t/lib/KohaTest/Koha.pm @@ -22,9 +22,9 @@ sub methods : Test( 1 ) { getframeworks getframeworkinfo getitemtypeinfo - getitemtypeimagesrcfromurl getitemtypeimagedir getitemtypeimagesrc + getitemtypeimagelocation _getImagesFromDirectory _getSubdirectoryNames getImageSets -- 2.39.5