[Koha-patches] [PATCH] BUG6081 In search results, do not show notforloan if false

Fridolyn SOMERS fridolyn.somers at progilone.fr
Wed Apr 6 12:05:32 CEST 2011


---
 C4/Search.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index c69e787..9eac229 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1675,7 +1675,8 @@ sub searchResults {
 					}
                     $other_items->{$key}->{intransit} = ($transfertwhen ne '') ? 1 : 0;
                     $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
-					$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value;
+					$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value)
+				        if ($notforloan_authorised_value && $item->{notforloan});
 					$other_items->{$key}->{count}++ if $item->{$hbranch};
 					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
 					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
-- 
1.7.1



More information about the Koha-patches mailing list