705 |
|
|
706 |
my $s; |
my $s; |
707 |
if ($s_el > 0) { |
if ($s_el > 0) { |
708 |
$s = $item->{'search'}->[$i] or warn "can't find value $i for type search in field $search"; |
$s = $item->{'search'}->[$i]; |
709 |
} else { |
} else { |
710 |
$s = $item->{'search'}->[0]; |
$s = $item->{'search'}->[0]; |
711 |
} |
} |
712 |
|
|
713 |
|
next unless (defined($s) && $s ne ''); |
714 |
|
|
715 |
#$s =~ s/([^\w.-])/sprintf("%%%02X",ord($1))/eg; |
#$s =~ s/([^\w.-])/sprintf("%%%02X",ord($1))/eg; |
716 |
$s = __quotemeta( $s ); |
$s = __quotemeta( $s ); |
717 |
|
|
718 |
my $d = $item->{'display'}->[$i] or warn "can't find value $i for type display in field $display"; |
my $d = $item->{'display'}->[$i]; |
719 |
|
|
720 |
|
next unless (defined($d) && $d ne ''); |
721 |
|
|
722 |
my $template_arg = ''; |
my $template_arg = ''; |
723 |
$template_arg = qq{,'$template'} if ($template); |
$template_arg = qq{,'$template'} if ($template); |