[Koha-patches] [PATCH] Fix itemtype image problem in moremember.pl
Jesse Weaver
jesse.weaver at liblime.com
Fri Aug 22 17:54:31 CEST 2008
---
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 a32062a..8e5b4c7 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 ee5422f..87a5659 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 c8a1982..c1773d9 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
--
1.5.5.GIT
More information about the Koha-patches
mailing list