From 5ccfb0963c85790a53f243131c8bf3da04bcd1c5 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sun, 27 Jan 2008 13:17:31 -0600 Subject: [PATCH] Bugfix to correct C4:Koha behavior which caused admin/itemtypes.pl to try to Signed-off-by: Joshua Ferraro --- C4/Koha.pm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 3697f4adb0..bbb170ce0b 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -455,15 +455,23 @@ sub getitemtypeimagesrcfromurl { } sub getitemtypeimagedir { - return C4::Context->opachtdocs . '/' - . C4::Context->preference('template') - . '/itemtypeimg'; + my $src = shift; + if ($src eq 'intranet') { + return C4::Context->config('intrahtdocs') . '/' .C4::Context->preference('template') . '/img/itemtypeimg'; + } + else { + return C4::Context->config('opachtdocs') . '/' . C4::Context->preference('template') . '/itemtypeimg'; + } } sub getitemtypeimagesrc { - return '/opac-tmpl' . '/' - . C4::Context->preference('template') - . '/itemtypeimg'; + my $src = shift; + if ($src eq 'intranet') { + return '/intranet-tmpl' . '/' . C4::Context->preference('template') . '/img/itemtypeimg'; + } + else { + return '/opac-tmpl' . '/' . C4::Context->preference('template') . '/itemtypeimg'; + } } =head2 GetPrinters -- 2.39.5