Lines 27-32
Link Here
|
27 |
use Modern::Perl; |
27 |
use Modern::Perl; |
28 |
|
28 |
|
29 |
use CGI qw ( -utf8 ); |
29 |
use CGI qw ( -utf8 ); |
|
|
30 |
use URI::Escape; |
30 |
use C4::Auth; |
31 |
use C4::Auth; |
31 |
use C4::Biblio; |
32 |
use C4::Biblio; |
32 |
use C4::Breeding; |
33 |
use C4::Breeding; |
Lines 70-83
if ($query) {
Link Here
|
70 |
my $QParser; |
71 |
my $QParser; |
71 |
$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser')); |
72 |
$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser')); |
72 |
my $builtquery; |
73 |
my $builtquery; |
|
|
74 |
my $query_cgi; |
73 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
75 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
74 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
76 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
75 |
my $searcher = Koha::SearchEngine::Search->new( |
77 |
my $searcher = Koha::SearchEngine::Search->new( |
76 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
78 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
77 |
if ($QParser) { |
79 |
if ($QParser) { |
78 |
$builtquery = $query; |
80 |
$builtquery = $query; |
|
|
81 |
$query_cgi = "q=".uri_escape_utf8($query); |
79 |
} else { |
82 |
} else { |
80 |
( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) = |
83 |
( undef, $builtquery, undef, $query_cgi, undef, undef, undef, undef, undef, undef ) = |
81 |
$builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang ); |
84 |
$builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang ); |
82 |
} |
85 |
} |
83 |
# find results |
86 |
# find results |
Lines 101-107
if ($query) {
Link Here
|
101 |
total => $total_hits, |
104 |
total => $total_hits, |
102 |
query => $query, |
105 |
query => $query, |
103 |
resultsloop => \@newresults, |
106 |
resultsloop => \@newresults, |
104 |
pagination_bar => pagination_bar( "/cgi-bin/koha/cataloguing/addbooks.pl?q=$query&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ), |
107 |
pagination_bar => pagination_bar( "/cgi-bin/koha/cataloguing/addbooks.pl?$query_cgi&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ), |
105 |
); |
108 |
); |
106 |
} |
109 |
} |
107 |
|
110 |
|
108 |
- |
|
|