changeset 3345:41e04736a9f1

info action: fix buglet with diff defaults
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 20 Mar 2008 14:29:12 +0100
parents dba9666479a9
children 9ceb503dd7a6
files MoinMoin/action/info.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Thu Mar 20 14:26:29 2008 +0100
+++ b/MoinMoin/action/info.py	Thu Mar 20 14:29:12 2008 +0100
@@ -104,16 +104,17 @@
         # read in the complete log of this page
         log = editlog.EditLog(request, rootpagename=pagename)
         count = 0
+        pgactioncount = 0
         for line in log.reverse():
             rev = int(line.rev)
             actions = []
             if line.action in ('SAVE', 'SAVENEW', 'SAVE/REVERT', 'SAVE/RENAME', ):
                 size = page.size(rev=rev)
                 actions.append(render_action(_('view'), {'action': 'recall', 'rev': '%d' % rev}))
-                if count == 0:
+                if pgactioncount == 0:
                     rchecked = ' checked="checked"'
                     lchecked = ''
-                elif count == 1:
+                elif pgactioncount == 1:
                     lchecked = ' checked="checked"'
                     rchecked = ''
                 else:
@@ -127,6 +128,7 @@
                         comment = _("Revert to revision %(rev)d.") % {'rev': int(line.extra)}
                     elif '/RENAME' in line.action:
                         comment = _("Renamed from '%(oldpagename)s'.") % {'oldpagename': line.extra}
+                pgactioncount += 1
             else: # ATT*
                 rev = '-'
                 diff = '-'