changeset 5708:cd113b42bc5d

ActionBase: better compatibility to moin 1.8, use request.values by default, optionally use request.form data only
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 26 Jun 2010 15:37:55 +0200
parents 83401c5bf249
children b853ed5b9965
files MoinMoin/action/__init__.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/__init__.py	Sun Jun 20 18:00:21 2010 +0200
+++ b/MoinMoin/action/__init__.py	Sat Jun 26 15:37:55 2010 +0200
@@ -45,9 +45,16 @@
 
     Note: the action name is the class name of the derived class
     """
-    def __init__(self, pagename, request):
+    def __init__(self, pagename, request, only_form=False):
         self.request = request
-        self.form = request.form
+        if only_form:
+            # use only form (POST) data, this was 1.9.0 .. 1.9.2 default,
+            # but different from 1.8 behaviour:
+            self.form = request.form
+        else:
+            # use query string values mixed with post form data - this gives
+            # better compatibility to moin 1.8 behaviour
+            self.form = request.values
         self.cfg = request.cfg
         self._ = _ = request.getText
         self.pagename = pagename