summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
de413c7)
s/too much hits/too many hits/
my $st0 = new Benchmark;
my @results;
my $st0 = new Benchmark;
my @results;
if ($searchon eq 'sourcenames') {
$search_on_sources = 1;
}
if ($searchon eq 'sourcenames') {
$search_on_sources = 1;
}
$p_obj->seq( $key, $prefixes, R_CURSOR );
while (index($key, $keyword) >= 0) {
if ($prefixes =~ /^\001(\d+)/o) {
$p_obj->seq( $key, $prefixes, R_CURSOR );
while (index($key, $keyword) >= 0) {
if ($prefixes =~ /^\001(\d+)/o) {
} else {
foreach (split /\000/o, $prefixes) {
$_ = '' if $_ eq '^';
} else {
foreach (split /\000/o, $prefixes) {
$_ = '' if $_ eq '^';
}
}
last if $p_obj->seq( $key, $prefixes, R_NEXT ) != 0;
}
}
last if $p_obj->seq( $key, $prefixes, R_NEXT ) != 0;
- last if $too_much_hits;
- last if keys %pkgs < 100;
+ last if $too_many_hits or keys %pkgs >= 100;
}
my $no_results = keys %pkgs;
}
my $no_results = keys %pkgs;
- if ($too_much_hits || ($no_results >= 100)) {
- $too_much_hits += $no_results;
+ if ($too_many_hits || ($no_results >= 100)) {
+ $too_many_hits += $no_results;
%pkgs = ( $keyword => 1 );
}
foreach my $pkg (sort keys %pkgs) {
%pkgs = ( $keyword => 1 );
}
foreach my $pkg (sort keys %pkgs) {
-if ($too_much_hits) {
-print "<p><strong>Your search was too wide so we will only display exact matches. At least <em>$too_much_hits</em> results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.</strong></p>";
+if ($too_many_hits) {
+print "<p><strong>Your search was too wide so we will only display exact matches. At least <em>$too_many_hits</em> results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.</strong></p>";