changeset 1239:20f59999e79c

only show page links when we got enough results
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Thu, 10 Aug 2006 17:15:32 +0200
parents 820518f0118e
children d2eadfef54b8
files MoinMoin/search/results.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/results.py	Thu Aug 10 13:28:52 2006 +0200
+++ b/MoinMoin/search/results.py	Thu Aug 10 17:15:32 2006 +0200
@@ -317,6 +317,9 @@
         else:
             list = f.bullet_list
 
+        if paging and len(self.hits) <= request.cfg.search_results_per_page:
+            paging = False
+
         # Add pages formatted as list
         if self.hits:
             write(list(1))
@@ -383,6 +386,9 @@
         f = formatter
         write = self.buffer.write
         _ = request.getText
+
+        if paging and len(self.hits) <= request.cfg.search_results_per_page:
+            paging = False
         
         # Add pages formatted as definition list
         if self.hits: