From 47c9b14c27a480b4c01d44866c54bb0b6c0ed61a Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 7 Dec 2009 11:17:20 +0100 Subject: [PATCH] Revert "[followup](MT #2298) fix bad conditions" This reverts commit 0f7d9aa432cf3043e498a59769bd0a8528dac04e. --- C4/Search.pm | 5 +++-- catalogue/search.pl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index af2611aaed..a709c648bf 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1659,7 +1659,7 @@ sub searchResults { ? C4::Context->preference('maxItemsinSearchResults') - 1 : 1; - if(not $limit_available){ + if(! $limit_available){ for my $key ( sort keys %$onloan_items) { (++$onloanitemscount > $maxitems) and last; push @onloan_items_loop, $onloan_items->{$key}; @@ -1707,7 +1707,8 @@ sub searchResults { $oldbiblio->{orderedcount} = $ordered_count; $oldbiblio->{isbn} =~ s/-//g; # deleting - in isbn to enable amazon content - push( @newresults, $oldbiblio ) if (not $limit_available or ($limit_available and $available_count)); + push( @newresults, $oldbiblio ) if ((not $limit_available and ($items_count)) + 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 1f72467d98..6f4ec63fb9 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'} || "0"; +my $available = $params->{'available'}; $template->param(available => $available); -- 2.39.5