changeset 1190:1d5fd64c356e

fix for showing next page link
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Tue, 18 Jul 2006 20:09:46 +0200
parents 0e352443948b
children 7d13ed31c40c cb0d00cef7d5
files MoinMoin/search/results.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/results.py	Tue Jul 18 19:33:59 2006 +0200
+++ b/MoinMoin/search/results.py	Tue Jul 18 20:09:46 2006 +0200
@@ -642,7 +642,7 @@
         uri = re.sub(from_re, '', self.request.request_uri)
         from_uri = lambda n: '%s&from=%i' % (uri, n)
         l = []
-        if hitsFrom > 0:        # previous page available
+        if hitsFrom > 0:                        # previous page available
             n = hitsFrom - hitsPerPage
             if n < 0: n = 0
             l.append(''.join([
@@ -650,7 +650,7 @@
                 _('Previous Page'),
                 f.url(0)
             ]))
-        if hitsFrom < hitsNum:  # next page available
+        if hitsFrom + hitsPerPage < hitsNum:    # next page available
             n = hitsFrom + hitsPerPage
             if n >= hitsNum: n = hitsNum - 1
             l.append(''.join([