changeset 4934:efd8087a3062

action diff: enable previous / next button only in the range of given revisions
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 04 Aug 2009 08:43:58 +0200
parents c8be59640927
children a6b0b1fcd463
files MoinMoin/action/diff.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/diff.py	Mon Aug 03 23:00:31 2009 +0200
+++ b/MoinMoin/action/diff.py	Tue Aug 04 08:43:58 2009 +0200
@@ -119,12 +119,12 @@
     title = f.text(title)
 
     # Revision list starts from 2...
-    if oldrev == min(revlist):
+    if oldrev <= min(revlist):
         disable_prev = u' disabled="disabled"'
     else:
         disable_prev = u''
 
-    if newrev == max(revlist):
+    if newrev >= max(revlist):
         disable_next = u' disabled="disabled"'
     else:
         disable_next = u''