From 55452bd7a22a902c1d97980297957bd73db167b9 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 25 Nov 2007 10:11:55 +0100 Subject: [PATCH] Parser/Ncsa.pm: Assure that at least 20 search terms are printed. --- lib/Yaala/Parser/Ncsa.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.11.0