--- trunk/html/swish.cgi 2003/03/18 20:24:57 22 +++ trunk/html/swish.cgi 2003/03/21 21:10:51 23 @@ -41,6 +41,14 @@ $labels{$_->{value}} = x($_->{content}); } +my $path = param('path'); # limit to this path +my %path_label; +my @path_name; +foreach (@{$config->{paths}->{path}}) { + push @path_name,x($_->{limit}); + $path_label{$_->{limit}} = x($_->{content}); +} + if ($config->{charset}) { print header(-charset=>x($config->{charset})); } else { @@ -53,6 +61,10 @@ print textfield('search'); print submit(-value=> x($config->{text}->{submit})); print checkbox(-name=>'no_affix', -checked=>0, -label=>x($config->{text}->{no_spell})) if ($spelling_alt); +if (@path_name) { + print br,x($config->{text}->{limit}); + print popup_menu(-name=>'path',-values=>\@path_name,-labels=>\%path_label,-default=>$path); +} print end_form,hr; if (param('search')) { @@ -95,6 +107,9 @@ $s=~tr/¹©ðÐèÈæƾ®/sSdDcCcCzZ/; $s=~s/\*\*+/*/g; + # limit to some path + $s = "swishdocpath=($path) and $s" if ($path); + my %params; # optional parametars for swish my @properties = split(/\s+/,x($config->{properties}));