changeset 3373:c20aa5b0158e

action.revert: reverted to bb04265ce89a
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 20 Mar 2008 22:02:02 +0100
parents 8ac95a64f1a8
children 043689a3b04c
files MoinMoin/action/revert.py
diffstat 1 files changed, 4 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/revert.py	Thu Mar 20 21:42:32 2008 +0100
+++ b/MoinMoin/action/revert.py	Thu Mar 20 22:02:02 2008 +0100
@@ -34,7 +34,6 @@
         return allowed, _('You are not allowed to revert this page!')
 
     def check_condition(self):
-        """ checks page and revision """
         _ = self._
         if not self.request.rev:
             # same string as in PageEditor...
@@ -49,23 +48,15 @@
             return None
 
     def do_action(self):
-        """ Revert pagename """
-        _ = self._
+        """ Delete pagename """
+        form = self.form
+        comment = form.get('comment', [u''])[0]
+        comment = wikiutil.clean_input(comment)
 
         if self.request.request_method != 'POST':
             return False, u''
 
-        form = self.form
         rev = self.request.rev
-        comment = form.get('comment', [u''])[0]
-        system_comment = _(u"Revert to revision %(rev)d.") % {'rev': int(rev)}
-        if not comment:
-            comment = system_comment
-        else:
-            comment = "%(comment)s (%(system_comment)s)" % {"comment": comment,
-                                                            "system_comment": system_comment}
-
-        comment = wikiutil.clean_input(comment)
         pg = PageEditor(self.request, self.pagename)
 
         try:
@@ -80,7 +71,6 @@
         return True, msg
 
     def get_form_html(self, buttons_html):
-        """ creates the form """
         _ = self._
 
         d = {