Lines 85-92
my ($template,$borrowernumber,$cookie);
Link Here
|
85 |
# decide which template to use |
85 |
# decide which template to use |
86 |
my $template_name; |
86 |
my $template_name; |
87 |
my $template_type = 'basic'; |
87 |
my $template_type = 'basic'; |
88 |
my @params = $cgi->param("limit"); |
88 |
my @params = $cgi->multi_param("limit"); |
89 |
my @searchCategories = $cgi->param('searchcat'); |
89 |
my @searchCategories = $cgi->multi_param('searchcat'); |
90 |
|
90 |
|
91 |
my $format = $cgi->param("format") || ''; |
91 |
my $format = $cgi->param("format") || ''; |
92 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
92 |
my $build_grouped_results = C4::Context->preference('OPACGroupResults'); |
Lines 393-399
if ( $params->{tag} ) {
Link Here
|
393 |
my $pasarParams = ''; |
393 |
my $pasarParams = ''; |
394 |
my $j = 0; |
394 |
my $j = 0; |
395 |
for (keys %$params) { |
395 |
for (keys %$params) { |
396 |
my @pasarParam = $cgi->param($_); |
396 |
my @pasarParam = $cgi->multi_param($_); |
397 |
for my $paramValue(@pasarParam) { |
397 |
for my $paramValue(@pasarParam) { |
398 |
$pasarParams .= '&' if ($j > 0); |
398 |
$pasarParams .= '&' if ($j > 0); |
399 |
$pasarParams .= $_ . '=' . uri_escape_utf8($paramValue); |
399 |
$pasarParams .= $_ . '=' . uri_escape_utf8($paramValue); |
Lines 424-430
foreach my $sort (@sort_by) {
Link Here
|
424 |
$template->param('sort_by' => $sort_by[0]); |
424 |
$template->param('sort_by' => $sort_by[0]); |
425 |
|
425 |
|
426 |
# Use the servers defined, or just search our local catalog(default) |
426 |
# Use the servers defined, or just search our local catalog(default) |
427 |
my @servers = $cgi->param('server'); |
427 |
my @servers = $cgi->multi_param('server'); |
428 |
unless (@servers) { |
428 |
unless (@servers) { |
429 |
#FIXME: this should be handled using Context.pm |
429 |
#FIXME: this should be handled using Context.pm |
430 |
@servers = ("biblioserver"); |
430 |
@servers = ("biblioserver"); |
Lines 433-444
unless (@servers) {
Link Here
|
433 |
|
433 |
|
434 |
# operators include boolean and proximity operators and are used |
434 |
# operators include boolean and proximity operators and are used |
435 |
# to evaluate multiple operands |
435 |
# to evaluate multiple operands |
436 |
my @operators = $cgi->param('op'); |
436 |
my @operators = $cgi->multi_param('op'); |
437 |
@operators = map { uri_unescape($_) } @operators; |
437 |
@operators = map { uri_unescape($_) } @operators; |
438 |
|
438 |
|
439 |
# indexes are query qualifiers, like 'title', 'author', etc. They |
439 |
# indexes are query qualifiers, like 'title', 'author', etc. They |
440 |
# can be single or multiple parameters separated by comma: kw,right-Truncation |
440 |
# can be single or multiple parameters separated by comma: kw,right-Truncation |
441 |
my @indexes = $cgi->param('idx'); |
441 |
my @indexes = $cgi->multi_param('idx'); |
442 |
@indexes = map { uri_unescape($_) } @indexes; |
442 |
@indexes = map { uri_unescape($_) } @indexes; |
443 |
|
443 |
|
444 |
# if a simple index (only one) display the index used in the top search box |
444 |
# if a simple index (only one) display the index used in the top search box |
Lines 446-452
if ($indexes[0] && !$indexes[1]) {
Link Here
|
446 |
$template->param("ms_".$indexes[0] => 1); |
446 |
$template->param("ms_".$indexes[0] => 1); |
447 |
} |
447 |
} |
448 |
# an operand can be a single term, a phrase, or a complete ccl query |
448 |
# an operand can be a single term, a phrase, or a complete ccl query |
449 |
my @operands = $cgi->param('q'); |
449 |
my @operands = $cgi->multi_param('q'); |
450 |
@operands = map { uri_unescape($_) } @operands; |
450 |
@operands = map { uri_unescape($_) } @operands; |
451 |
|
451 |
|
452 |
$template->{VARS}->{querystring} = join(' ', @operands); |
452 |
$template->{VARS}->{querystring} = join(' ', @operands); |
Lines 459-467
if ($operands[0] && !$operands[1]) {
Link Here
|
459 |
} |
459 |
} |
460 |
|
460 |
|
461 |
# limits are use to limit to results to a pre-defined category such as branch or language |
461 |
# limits are use to limit to results to a pre-defined category such as branch or language |
462 |
my @limits = $cgi->param('limit'); |
462 |
my @limits = $cgi->multi_param('limit'); |
463 |
@limits = map { uri_unescape($_) } @limits; |
463 |
@limits = map { uri_unescape($_) } @limits; |
464 |
my @nolimits = $cgi->param('nolimit'); |
464 |
my @nolimits = $cgi->multi_param('nolimit'); |
465 |
@nolimits = map { uri_unescape($_) } @nolimits; |
465 |
@nolimits = map { uri_unescape($_) } @nolimits; |
466 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
466 |
my %is_nolimit = map { $_ => 1 } @nolimits; |
467 |
@limits = grep { not $is_nolimit{$_} } @limits; |
467 |
@limits = grep { not $is_nolimit{$_} } @limits; |