From ac5130c57cd95a8b030534bf62861cc565edd3f9 Mon Sep 17 00:00:00 2001 From: Srdjan Date: Thu, 26 Mar 2015 19:32:15 +1300 Subject: [PATCH] Bug 5786: Correction: Removed erroneous holdability check from opac-search.pl Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/modules/opac-results.tt | 2 +- opac/opac-search.pl | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index fd2cb9f3a3..2622b59816 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -471,7 +471,7 @@
[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %] [% UNLESS ( SEARCH_RESULT.norequests ) %] - [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && SEARCH_RESULT.holdable %] + [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %] Place hold [% END # / IF opacuserlogin && holdable %] [% END # UNLESS SEARCH_RESULT.norequests %] diff --git a/opac/opac-search.pl b/opac/opac-search.pl index cdf0fbb477..f634f12a9f 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -42,8 +42,6 @@ use C4::Branch; # GetBranches use C4::SocialData; use C4::Ratings; use C4::External::OverDrive; -use C4::Members; -use C4::Reserves; use POSIX qw(ceil floor strftime); use URI::Escape; @@ -569,11 +567,8 @@ if ($@ || $error) { exit; } -my $borrower = $borrowernumber ? GetMember( borrowernumber => $borrowernumber ) : undef; - # At this point, each server has given us a result set # now we build that set for template display -my %allow_onshelf_holds; my @sup_results_array; for (my $i=0;$i<@servers;$i++) { my $server = $servers[$i]; @@ -588,23 +583,11 @@ for (my $i=0;$i<@servers;$i++) { # we need to set the offset parameter of searchResults to 0 my @group_results = searchResults( 'opac', $query_desc, $group->{'group_count'},$results_per_page, 0, $scan, $group->{"RECORDS"}); - if ($borrower) { - $_->{holdable} = - IsAvailableForItemLevelRequest($_, $borrower) && - OPACItemHoldsAllowed($_, $borrower) - foreach @group_results; - } push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results }; } } else { @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, $results_hashref->{$server}->{"RECORDS"}); - if ($borrower) { - $_->{holdable} = - IsAvailableForItemLevelRequest($_, $borrower) && - OPACItemHoldsAllowed($_, $borrower) - foreach @newresults; - } } $hits = 0 unless @newresults; -- 2.39.5