diff MoinMoin/action/info.py @ 3290:abb32b0af96b

revision history: enable the user to get more revisions show by using max_count=123, enable wiki admin to limit that
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 17 Mar 2008 17:17:54 +0100
parents e06e15e90ba7
children 04548b25e042
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Mon Mar 17 16:46:41 2008 +0100
+++ b/MoinMoin/action/info.py	Mon Mar 17 17:17:54 2008 +0100
@@ -5,7 +5,7 @@
     Displays page history, some general page infos and statistics.
 
     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
-                2006-2007 MoinMoin:ThomasWaldmann
+                2006-2008 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -74,6 +74,12 @@
     def history(page, pagename, request):
         # show history as default
         _ = request.getText
+        default_count, limit_max_count = request.cfg.history_count
+        try:
+            max_count = int(request.form.get('max_count', [default_count])[0])
+        except:
+            max_count = default_count
+        max_count = min(max_count, limit_max_count)
 
         # open log for this page
         from MoinMoin.util.dataset import TupleDataset, Column
@@ -151,7 +157,7 @@
                 "&nbsp;".join(actions),
             ))
             count += 1
-            if count >= 100:
+            if count >= max_count:
                 break
 
         # print version history