Lines 42-49
use C4::Branch; # GetBranches
Link Here
|
42 |
use C4::SocialData; |
42 |
use C4::SocialData; |
43 |
use C4::Ratings; |
43 |
use C4::Ratings; |
44 |
use C4::External::OverDrive; |
44 |
use C4::External::OverDrive; |
45 |
use C4::Members; |
|
|
46 |
use C4::Reserves; |
47 |
|
45 |
|
48 |
use POSIX qw(ceil floor strftime); |
46 |
use POSIX qw(ceil floor strftime); |
49 |
use URI::Escape; |
47 |
use URI::Escape; |
Lines 569-579
if ($@ || $error) {
Link Here
|
569 |
exit; |
567 |
exit; |
570 |
} |
568 |
} |
571 |
|
569 |
|
572 |
my $borrower = $borrowernumber ? GetMember( borrowernumber => $borrowernumber ) : undef; |
|
|
573 |
|
574 |
# At this point, each server has given us a result set |
570 |
# At this point, each server has given us a result set |
575 |
# now we build that set for template display |
571 |
# now we build that set for template display |
576 |
my %allow_onshelf_holds; |
|
|
577 |
my @sup_results_array; |
572 |
my @sup_results_array; |
578 |
for (my $i=0;$i<@servers;$i++) { |
573 |
for (my $i=0;$i<@servers;$i++) { |
579 |
my $server = $servers[$i]; |
574 |
my $server = $servers[$i]; |
Lines 588-610
for (my $i=0;$i<@servers;$i++) {
Link Here
|
588 |
# we need to set the offset parameter of searchResults to 0 |
583 |
# we need to set the offset parameter of searchResults to 0 |
589 |
my @group_results = searchResults( 'opac', $query_desc, $group->{'group_count'},$results_per_page, 0, $scan, |
584 |
my @group_results = searchResults( 'opac', $query_desc, $group->{'group_count'},$results_per_page, 0, $scan, |
590 |
$group->{"RECORDS"}); |
585 |
$group->{"RECORDS"}); |
591 |
if ($borrower) { |
|
|
592 |
$_->{holdable} = |
593 |
IsAvailableForItemLevelRequest($_, $borrower) && |
594 |
OPACItemHoldsAllowed($_, $borrower) |
595 |
foreach @group_results; |
596 |
} |
597 |
push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results }; |
586 |
push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results }; |
598 |
} |
587 |
} |
599 |
} else { |
588 |
} else { |
600 |
@newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, |
589 |
@newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, |
601 |
$results_hashref->{$server}->{"RECORDS"}); |
590 |
$results_hashref->{$server}->{"RECORDS"}); |
602 |
if ($borrower) { |
|
|
603 |
$_->{holdable} = |
604 |
IsAvailableForItemLevelRequest($_, $borrower) && |
605 |
OPACItemHoldsAllowed($_, $borrower) |
606 |
foreach @newresults; |
607 |
} |
608 |
} |
591 |
} |
609 |
$hits = 0 unless @newresults; |
592 |
$hits = 0 unless @newresults; |
610 |
|
593 |
|
611 |
- |
|
|