if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
my %row =( number=>$cnt++,
- ccl => $itype_or_itemtype,
+ ccl => qq($itype_or_itemtype,phr),
code => $thisitemtype,
selected => $selected,
description => $itemtypes->{$thisitemtype}->{'description'},
@indexes = split("\0",$params->{'idx'});
# if a simple index (only one) display the index used in the top search box
-if ($indexes[0] && !$indexes[1]) {
- $template->param("ms_".$indexes[0] => 1);}
+if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) {
+ my $idx = "ms_".$indexes[0];
+ $idx =~ s/\,/comma/g; # template toolkit doesnt like variables with a , in it
+ $template->param($idx => 1);
+}
# an operand can be a single term, a phrase, or a complete ccl query
for my $this_cgi ( split('&',$query_cgi) ) {
next unless $this_cgi;
- $this_cgi =~ m/(.*=)(.*)/;
+ $this_cgi =~ m/(.?)=(.*)/;
my $input_name = $1;
my $input_value = $2;
- $input_name =~ s/=$//;
push @query_inputs, { input_name => $input_name, input_value => $input_value };
if ($input_name eq 'idx') {
$scan_index_to_use = $input_value; # unless $scan_index_to_use;