Bug 6050 Make calls to GetItemsInfo consistent
[koha.git] / catalogue / search.pl
index acd9f4c..a41b18a 100755 (executable)
@@ -297,7 +297,7 @@ if ( $template_type eq 'advsearch' ) {
     # shouldn't appear on the first one, scan indexes should, adding a new
     # box should only appear on the last, etc.
     my @search_boxes_array;
-    my $search_boxes_count = C4::Context->preference("OPACAdvSearchInputCount") || 3; # FIXME: using OPAC sysprefs?
+    my $search_boxes_count = 3; # begin whith 3 boxes
     # FIXME: all this junk can be done in TMPL using __first__ and __last__
     for (my $i=1;$i<=$search_boxes_count;$i++) {
         # if it's the first one, don't display boolean option, but show scan indexes
@@ -384,7 +384,10 @@ my @indexes;
 
 # if a simple index (only one)  display the index used in the top search box
 if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) {
-    $template->param("ms_".$indexes[0] => 1);}
+    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