Lines 33-38
use Koha::Logger;
Link Here
|
33 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
33 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
34 |
use Koha::Items; |
34 |
use Koha::Items; |
35 |
use Koha::ItemTypes; |
35 |
use Koha::ItemTypes; |
|
|
36 |
use Koha::SearchEngine::QueryBuilder; |
36 |
use Koha::SearchEngine::Search; |
37 |
use Koha::SearchEngine::Search; |
37 |
|
38 |
|
38 |
my $query = CGI->new; |
39 |
my $query = CGI->new; |
Lines 85-104
if ( $op eq "do_search" ) {
Link Here
|
85 |
} |
86 |
} |
86 |
} |
87 |
} |
87 |
|
88 |
|
88 |
my ( $error, $query, $simple_query, $query_cgi, |
89 |
my ( $build_error, $query, $simple_query, $query_cgi, |
89 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
90 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
90 |
$query_type ) |
91 |
$query_type ) |
91 |
= $builder->build_query_compat( undef, [$ccl_textbox], [$idx], \@limits); |
92 |
= $builder->build_query_compat( undef, [$ccl_textbox], [$idx], \@limits); |
92 |
|
93 |
|
93 |
my $offset = $startfrom > 1 ? $startfrom - 1 : 0; |
94 |
my $offset = $startfrom > 1 ? $startfrom - 1 : 0; |
94 |
|
95 |
|
95 |
my ( $error, $marcresults, $facets ) = $searcher->search_compat( |
96 |
my ( $error, $results, $facets ) = $searcher->search_compat( |
96 |
$query, $simple_query, undef, ['biblioserver'], $resultsperpage, $offset, |
97 |
$query, $simple_query, [], ['biblioserver'], $resultsperpage, $offset, |
97 |
undef, undef, $query_type, undef |
98 |
undef, undef, $query_type, undef |
98 |
); |
99 |
); |
99 |
|
100 |
|
100 |
if (!defined $error && $marcresults->{biblioserver}{RECORDS} ) { |
101 |
if (!defined $error && @{$results->{biblioserver}{RECORDS}} ) { |
101 |
$show_results = $marcresults->{biblioserver}{RECORDS}; |
102 |
$show_results = @{$results->{biblioserver}{RECORDS}}; |
|
|
103 |
$marcresults = $results->{biblioserver}{RECORDS}; |
102 |
} |
104 |
} |
103 |
else { |
105 |
else { |
104 |
Koha::Logger->get->warn("ERROR label-item-search: no results from simple_search_compat"); |
106 |
Koha::Logger->get->warn("ERROR label-item-search: no results from simple_search_compat"); |
105 |
- |
|
|