From 7f7333aebd75f63edb74b727965353cb379e6568 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 3 Dec 2009 13:46:33 +0100 Subject: [PATCH] [followup](MT #2298) fix bad conditions This patch fix bad condition that hide in all cases records without items. --- C4/Search.pm | 5 ++--- catalogue/search.pl | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index a709c648bf..af2611aaed 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1659,7 +1659,7 @@ sub searchResults { ? C4::Context->preference('maxItemsinSearchResults') - 1 : 1; - if(! $limit_available){ + if(not $limit_available){ for my $key ( sort keys %$onloan_items) { (++$onloanitemscount > $maxitems) and last; push @onloan_items_loop, $onloan_items->{$key}; @@ -1707,8 +1707,7 @@ sub searchResults { $oldbiblio->{orderedcount} = $ordered_count; $oldbiblio->{isbn} =~ s/-//g; # deleting - in isbn to enable amazon content - push( @newresults, $oldbiblio ) if ((not $limit_available and ($items_count)) - or ($limit_available and $available_count)); + push( @newresults, $oldbiblio ) if (not $limit_available or ($limit_available and $available_count)); #if((not $hidelostitems and not $limit_available ) #or ($items_count > $itemlost_count and $available_count )); diff --git a/catalogue/search.pl b/catalogue/search.pl index 6f4ec63fb9..1f72467d98 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -378,7 +378,7 @@ if($params->{'multibranchlimit'}) { push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; } -my $available = $params->{'available'}; +my $available = $params->{'available'} || "0"; $template->param(available => $available); -- 2.39.5