X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=lib%2FPackages%2FDoSearch.pm;h=bc55b747ec41b5091a12ae7f4712bde83d4fb50a;hb=80a1e989380ebf17bd8b980972dfefb90bc97f8c;hp=c90a46f022414013856fa7c4a67f6f38ed19e2b3;hpb=e6999b858367d9d83e0fa2c32cddfd31b4416486;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearch.pm b/lib/Packages/DoSearch.pm index c90a46f..bc55b74 100644 --- a/lib/Packages/DoSearch.pm +++ b/lib/Packages/DoSearch.pm @@ -15,12 +15,15 @@ use Deb::Versions; use Packages::Search qw( :all ); use Packages::CGI; use Packages::DB; -use Packages::Config qw( $DBDIR $SEARCH_URL $SEARCH_CGI $SEARCH_PAGE +use Packages::HTML qw(marker); +use Packages::Config qw( $DBDIR $SEARCH_URL $SEARCH_PAGE @SUITES @ARCHIVES $ROOT ); sub do_search { my ($params, $opts, $html_header, $menu, $page_content) = @_; + $Params::Search::too_many_hits = 0; + if ($params->{errors}{keywords}) { fatal_error( "keyword not valid or missing" ); } elsif (length($opts->{keywords}) < 2) { @@ -37,6 +40,7 @@ sub do_search { my $suites_param = join ',', @{$params->{values}{suite}{no_replace}}; my $sections_param = join ',', @{$params->{values}{section}{no_replace}}; my $archs_param = join ',', @{$params->{values}{arch}{no_replace}}; + $opts->{common_params} = "suite=$suites_param§ion=$sections_param&keywords=$keyword_esc&searchon=$searchon&arch=$archs_param"; # for output my $keyword_enc = encode_entities $keyword || ''; @@ -123,7 +127,10 @@ sub do_search { if ($opts->{exact}) { $printed++; - hint( "You have searched only for words exactly matching your keywords. You can try to search allowing subword matching." ); + hint( "You have searched only for words exactly matching your + keywords. You can try to search {common_params}")."\">allowing + subword matching." ); } } hint( ( $printed ? "Or you" : "You" )." can try a different search on the Packages search page." ); @@ -243,7 +250,7 @@ sub print_packages { map { $_->{$pkg}||{} } @func_args ); } } elsif (@$pkgs_list) { - $str .= "

". + $str .= "

{common_params}")."\">". ($#{$pkgs_list}+1)." results have not been displayed because you requested only exact matches.

"; } $str .= '';