|
Lines 40-46
my $query = CGI->new;
Link Here
|
| 40 |
my $type = $query->param('type'); |
40 |
my $type = $query->param('type'); |
| 41 |
my $op = $query->param('op') || ''; |
41 |
my $op = $query->param('op') || ''; |
| 42 |
my $batch_id = $query->param('batch_id'); |
42 |
my $batch_id = $query->param('batch_id'); |
| 43 |
my $ccl_query = $query->param('ccl_query'); |
43 |
my @limits = split(" AND ", $query->param('limits') || ""); |
| 44 |
my $startfrom = $query->param('startfrom') || 1; |
44 |
my $startfrom = $query->param('startfrom') || 1; |
| 45 |
my ($template, $loggedinuser, $cookie) = (undef, undef, undef); |
45 |
my ($template, $loggedinuser, $cookie) = (undef, undef, undef); |
| 46 |
my ( |
46 |
my ( |
|
Lines 68-80
if ( $op eq "do_search" ) {
Link Here
|
| 68 |
my $searcher = Koha::SearchEngine::Search->new( |
68 |
my $searcher = Koha::SearchEngine::Search->new( |
| 69 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
69 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
| 70 |
|
70 |
|
| 71 |
my @limits; |
71 |
if (!@limits) { |
| 72 |
if ($datefrom) { |
72 |
push(@limits, "acqdate,ge,st-date-normalized=$datefrom") if ($datefrom); |
| 73 |
push(@limits, "acqdate,ge,st-date-normalized=$datefrom"); |
73 |
push(@limits, "acqdate,le,st-date-normalized=$dateto") if ($dateto); |
| 74 |
} |
|
|
| 75 |
|
| 76 |
if ($dateto) { |
| 77 |
push(@limits, "acqdate,le,st-date-normalized=$dateto"); |
| 78 |
} |
74 |
} |
| 79 |
|
75 |
|
| 80 |
my ( $build_error, $query, $simple_query, $query_cgi, |
76 |
my ( $build_error, $query, $simple_query, $query_cgi, |
|
Lines 90-97
if ( $op eq "do_search" ) {
Link Here
|
| 90 |
); |
86 |
); |
| 91 |
|
87 |
|
| 92 |
if (!defined $error && @{$results->{biblioserver}{RECORDS}} ) { |
88 |
if (!defined $error && @{$results->{biblioserver}{RECORDS}} ) { |
| 93 |
$show_results = @{$results->{biblioserver}{RECORDS}}; |
89 |
$show_results = grep { defined $_ } @{$results->{biblioserver}{RECORDS}}; |
| 94 |
$marcresults = $results->{biblioserver}{RECORDS}; |
90 |
$marcresults = [ grep { defined $_ } @{$results->{biblioserver}{RECORDS}} ]; |
|
|
91 |
$total_hits = $results->{biblioserver}{hits}; |
| 95 |
} |
92 |
} |
| 96 |
else { |
93 |
else { |
| 97 |
Koha::Logger->get->warn("ERROR label-item-search: no results from simple_search_compat"); |
94 |
Koha::Logger->get->warn("ERROR label-item-search: no results from simple_search_compat"); |
|
Lines 196-206
if ($show_results) {
Link Here
|
| 196 |
); |
193 |
); |
| 197 |
|
194 |
|
| 198 |
$template->param( |
195 |
$template->param( |
| 199 |
results => ($show_results ? 1 : 0), |
196 |
results => ($show_results ? 1 : 0), |
| 200 |
result_set=> \@results_set, |
197 |
result_set => \@results_set, |
| 201 |
batch_id => $batch_id, |
198 |
batch_id => $batch_id, |
| 202 |
type => $type, |
199 |
type => $type, |
| 203 |
ccl_query => $ccl_query, |
200 |
idx => $idx, |
|
|
201 |
ccl_textbox => $ccl_textbox, |
| 202 |
limits => join(" AND ", @limits), |
| 204 |
); |
203 |
); |
| 205 |
} |
204 |
} |
| 206 |
|
205 |
|
| 207 |
- |
|
|