Parser/Ncsa.pm: Assure that at least 20 search terms are printed.
authorFlorian Forster <octo@huhu.verplant.org>
Sun, 25 Nov 2007 09:11:55 +0000 (10:11 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Sun, 25 Nov 2007 09:11:55 +0000 (10:11 +0100)
lib/Yaala/Parser/Ncsa.pm

index 79d7625..902ba92 100644 (file)
@@ -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);