|
Lines 19-26
use Modern::Perl;
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Mojo::Base 'Mojolicious::Plugin'; |
20 |
use Mojo::Base 'Mojolicious::Plugin'; |
| 21 |
|
21 |
|
| 22 |
use JSON qw(decode_json); |
22 |
use JSON qw(from_json); |
| 23 |
use Encode qw(encode_utf8); |
|
|
| 24 |
|
23 |
|
| 25 |
=head1 NAME |
24 |
=head1 NAME |
| 26 |
|
25 |
|
|
Lines 105-112
sub register {
Link Here
|
| 105 |
my @query_params_array; |
104 |
my @query_params_array; |
| 106 |
my $query_params; |
105 |
my $query_params; |
| 107 |
push @query_params_array, $reserved_params->{query} if defined $reserved_params->{query}; |
106 |
push @query_params_array, $reserved_params->{query} if defined $reserved_params->{query}; |
| 108 |
push @query_params_array, decode_json(encode_utf8 $reserved_params->{q}) if defined $reserved_params->{q}; |
107 |
push @query_params_array, from_json($reserved_params->{q}) if defined $reserved_params->{q}; |
| 109 |
push @query_params_array, decode_json(encode_utf8 $reserved_params->{'x-koha-query'}) if defined $reserved_params->{'x-koha-query'}; |
108 |
push @query_params_array, from_json($reserved_params->{'x-koha-query'}) if defined $reserved_params->{'x-koha-query'}; |
| 110 |
|
109 |
|
| 111 |
if(scalar(@query_params_array) > 1) { |
110 |
if(scalar(@query_params_array) > 1) { |
| 112 |
$query_params = {'-and' => \@query_params_array}; |
111 |
$query_params = {'-and' => \@query_params_array}; |
| 113 |
- |
|
|