include fcayre's patch #1060507 to get extra rql query parameters from form content in rgx_action stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 04 Oct 2010 19:09:09 +0200
branchstable
changeset 6393 7372100062e8
parent 6392 faee4c380e50
child 6398 ea26eb5fd388
include fcayre's patch #1060507 to get extra rql query parameters from form content in rgx_action
web/views/urlrewrite.py
--- a/web/views/urlrewrite.py	Mon Oct 04 19:05:51 2010 +0200
+++ b/web/views/urlrewrite.py	Mon Oct 04 19:09:09 2010 +0200
@@ -163,7 +163,7 @@
     return do_build_rset
 
 def rgx_action(rql=None, args=None, cachekey=None, argsgroups=(), setuser=False,
-               form=None, formgroups=(), transforms={}, controller=None):
+               form=None, formgroups=(), transforms={}, rqlformparams=(), controller=None):
     def do_build_rset(inputurl, uri, req, schema,
                       cachekey=cachekey # necessary to avoid UnboundLocalError
                       ):
@@ -183,6 +183,8 @@
                         kwargs[key] = typed_eid(value)
             if setuser:
                 kwargs['u'] = req.user.eid
+            for param in rqlformparams:
+                kwargs.setdefault(param, req.form.get(param))
             rset = req.execute(rql, kwargs, cachekey)
         else:
             rset = None