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'},
# 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
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;
my ($pubshelves, $total) = GetRecentShelves(2, $row_count, undef);
my ($barshelves, $total) = GetRecentShelves(1, $row_count, $borrowernumber);
-my @pubshelves = @{$pubshelves};
-my @barshelves = @{$barshelves};
-
-if (@pubshelves) {
- $template->param( addpubshelves => scalar (@pubshelves));
- $template->param( addpubshelvesloop => @pubshelves);
+if (@{$pubshelves}) {
+ $template->param( addpubshelves => scalar @{$pubshelves});
+ $template->param( addpubshelvesloop => $pubshelves);
}
-if (@barshelves) {
- $template->param( addbarshelves => scalar (@barshelves));
- $template->param( addbarshelvesloop => @barshelves);
+if (@{$barshelves}) {
+ $template->param( addbarshelves => scalar @{$barshelves});
+ $template->param( addbarshelvesloop => $barshelves);
}