comparison MoinMoin/action/revert.py @ 3357:bb04265ce89a

fix revert action. I suck.
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 20 Mar 2008 16:31:10 +0100
parents 2dd4904cfee4
children 80ecec6e008b
comparison
equal deleted inserted replaced
3356:2dd4904cfee4 3357:bb04265ce89a
21 ActionBase.__init__(self, pagename, request) 21 ActionBase.__init__(self, pagename, request)
22 self.use_ticket = True 22 self.use_ticket = True
23 _ = self._ 23 _ = self._
24 self.form_trigger = 'revert' 24 self.form_trigger = 'revert'
25 self.form_trigger_label = _('Revert') 25 self.form_trigger_label = _('Revert')
26 self.method = 'POST'
26 27
27 def is_allowed(self): 28 def is_allowed(self):
28 # this is not strictly necessary because the underlying storage code checks 29 # this is not strictly necessary because the underlying storage code checks
29 # as well 30 # as well
30 _ = self._ 31 _ = self._
50 """ Delete pagename """ 51 """ Delete pagename """
51 form = self.form 52 form = self.form
52 comment = form.get('comment', [u''])[0] 53 comment = form.get('comment', [u''])[0]
53 comment = wikiutil.clean_input(comment) 54 comment = wikiutil.clean_input(comment)
54 55
55 if self.request.method != 'POST': 56 if self.request.request_method != 'POST':
56 return False, u'' 57 return False, u''
57 58
58 rev = self.request.rev 59 rev = self.request.rev
59 pg = PageEditor(self.request, self.pagename) 60 pg = PageEditor(self.request, self.pagename)
60 61