--- branches/hidra/WebPac.pm 2004/04/17 20:50:56 305
+++ branches/hidra/WebPac.pm 2004/12/08 14:41:55 597
@@ -28,20 +28,24 @@
my $ON_PAGE =$cfg_global->val('webpac', 'on_page') || 10;
my $MIN_WILDCARD =$cfg_global->val('webpac', 'min_wildcard') || 1;
my $TEMPLATE =$cfg_global->val('webpac', 'template');
-my $UNAC_FILTER =$cfg_global->val('global', 'unac_filter');
+my $UNAC_FILTER =$cfg_global->val('global', 'my_unac_filter');
my $BASE_PATH =$cfg_global->val('webpac', 'base_path');
# for pager
my $pages_per_set = $cfg_global->val('webpac', 'pages_per_set') || 10;
+Text::Iconv->raise_error(0); # Conversion errors raise exceptions
+
+my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);
if ($UNAC_FILTER) {
require $UNAC_FILTER;
+} else {
+ sub WebPac::my_unac_string {
+ my ($charset, $string) = (@_);
+ return $string;
+ }
}
-Text::Iconv->raise_error(0); # Conversion errors raise exceptions
-
-my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);
-
# use path from cgi script to support templates in subdirs
sub url_ex {
my $q = shift || die "suff2file needs CGI object!";
@@ -179,7 +183,9 @@
my @persist_vars = @_;
my $hidden_vars = '';
foreach my $v (@persist_vars) {
- $hidden_vars .= ''."\n";
+ foreach my $val ($q->param($v)) {
+ $hidden_vars .= ''."\n";
+ }
}
$tmpl->param('PAGER_HIDDEN', $hidden_vars);
@@ -255,7 +261,7 @@
while (my $search = shift @param_vals) {
my $s;
# remove accents
- $search = unac_string($CHARSET,$search);
+ $search = my_unac_string($CHARSET,$search);
while ($search =~ s/\s*("[^"]+")\s*/ /) {
$s .= "$1 ";
}
@@ -318,12 +324,13 @@
# construct swish query
my $sw_q = join(" and ",@s_arr);
- if (@path_arr && $q->param('show_full')) {
+ if (@path_arr) {
$sw_q .= "and (swishdocpath=\"";
$sw_q .= join("\" or swishdocpath=\"",@path_arr);
$sw_q .= "\")";
- $tmpl->param('full',1); # show full records
- } elsif ($q->param('show_full')) {
+ }
+
+ if ($q->param('show_full')) {
# just show full path, no path defined
$tmpl->param('full',1);
} else {