changeset 1009:714b9f7ce9e4

use request.action
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Jul 2006 16:26:49 +0200
parents 43279823cf24
children 2e7a3dd04833
files MoinMoin/macro/Include.py MoinMoin/macro/Navigation.py
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/Include.py	Sat Jul 22 16:06:31 2006 +0200
+++ b/MoinMoin/macro/Include.py	Sat Jul 22 16:26:49 2006 +0200
@@ -65,7 +65,7 @@
 
     # prepare including page
     result = []
-    print_mode = macro.form.has_key('action') and macro.form['action'][0] in ("print", "format")
+    print_mode = request.action in ("print", "format")
     this_page = macro.formatter.page
     if not hasattr(this_page, '_macroInclude_pagelist'):
         this_page._macroInclude_pagelist = {}
--- a/MoinMoin/macro/Navigation.py	Sat Jul 22 16:06:31 2006 +0200
+++ b/MoinMoin/macro/Navigation.py	Sat Jul 22 16:26:49 2006 +0200
@@ -74,8 +74,7 @@
         self._ = self.macro.request.getText
 
         self.pagename = self.macro.formatter.page.page_name
-        self.print_mode = self.macro.request.form.has_key('action') \
-            and self.macro.request.form['action'][0] == 'print'
+        self.print_mode = self.macro.request.action == 'print'
         self.media = self.macro.request.form.get('media', [None])[0]
         self.querystr = self.print_mode and self.PROJECTION or ''