changeset 1008:43279823cf24

use request.action
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Jul 2006 16:06:31 +0200
parents 8cc609b746de
children 714b9f7ce9e4
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sat Jul 22 15:49:40 2006 +0200
+++ b/MoinMoin/theme/__init__.py	Sat Jul 22 16:06:31 2006 +0200
@@ -640,8 +640,7 @@
             contentActions = [u'', u'show', u'refresh', u'preview', u'diff',
                               u'subscribe', u'RenamePage', u'DeletePage',
                               u'SpellCheck', u'print']
-            action = self.request.form.get('action', [''])[0]
-            return action in contentActions
+            return self.request.action in contentActions
         return False
 
     def pageinfo(self, page):
@@ -747,7 +746,7 @@
         @return: script for html head
         """
         # Don't add script for print view
-        if self.request.form.get('action', [''])[0] == 'print':
+        if self.request.action == 'print':
             return u''
 
         _ = self.request.getText
@@ -1077,7 +1076,7 @@
         if (page.exists(includeDeleted=1) and
             self.request.user.may.read(page.page_name)):
             form = self.request.form
-            action = form.get('action', [''])[0]
+            action = self.request.action
             # Do not show editbar on edit but on save/cancel
             return not (action == 'edit' and
                         not form.has_key('button_save') and
@@ -1695,8 +1694,7 @@
         request.clock.stop('total')
 
         # Close html code
-        if (request.cfg.show_timings and
-            request.form.get('action', [None])[0] != 'print'):
+        if request.cfg.show_timings and request.action != 'print':
             request.write('<ul id="timings">\n')
             for t in request.clock.dump():
                 request.write('<li>%s</li>\n' % t)