changeset 1242:d58efa0c4ce8

show real range count of results
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Thu, 10 Aug 2006 18:10:41 +0200
parents cba856bc0c05
children 96e852930e24 cf88789ac3f0
files MoinMoin/search/results.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/results.py	Thu Aug 10 17:43:50 2006 +0200
+++ b/MoinMoin/search/results.py	Thu Aug 10 18:10:41 2006 +0200
@@ -292,7 +292,9 @@
                 {'aboutHits': self.estimated_hits[0],
                     'hits': self.estimated_hits[1], 'pages': self.pages,
                     'hitsFrom': hitsFrom + 1,
-                    'hitsTo': hitsFrom + request.cfg.search_results_per_page,
+                    'hitsTo': hitsFrom +
+                            min(self.estimated_hits[1] - hitsFrom,
+                                request.cfg.search_results_per_page),
                     'bs': formatter.strong(1), 'be': formatter.strong(0)},
             u' (%s %s)' % (''.join([formatter.strong(1),
                 formatter.text("%.2f" % self.elapsed),