From: Florian Forster Date: Sun, 25 Nov 2007 09:11:55 +0000 (+0100) Subject: Parser/Ncsa.pm: Assure that at least 20 search terms are printed. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=55452bd7a22a902c1d97980297957bd73db167b9;p=yaala.git Parser/Ncsa.pm: Assure that at least 20 search terms are printed. --- diff --git a/lib/Yaala/Parser/Ncsa.pm b/lib/Yaala/Parser/Ncsa.pm index 79d7625..902ba92 100644 --- a/lib/Yaala/Parser/Ncsa.pm +++ b/lib/Yaala/Parser/Ncsa.pm @@ -172,8 +172,9 @@ sub extra my $max = $EXTRA->{'search_terms'}{$sorted_terms[0]}; my @scalar_terms = (); - while (@sorted_terms and - ($EXTRA->{'search_terms'}{$sorted_terms[0]} / $max) > 0.1) + while (@sorted_terms && + ((($EXTRA->{'search_terms'}{$sorted_terms[0]} / $max) > 0.1) + || (@scalar_terms < 20))) { $_ = shift (@sorted_terms);