fix #344895: view action should skip navigation parameters stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 05 Aug 2009 17:30:47 +0200
branchstable
changeset 2701 afcc19c92072
parent 2688 afa99d53401c
child 2702 f19bc131b2d9
fix #344895: view action should skip navigation parameters
web/views/actions.py
--- a/web/views/actions.py	Tue Aug 04 18:48:46 2009 +0200
+++ b/web/views/actions.py	Wed Aug 05 17:30:47 2009 +0200
@@ -15,6 +15,7 @@
     authenticated_user, match_user_groups, match_search_state,
     has_permission, has_add_permission,
     )
+from cubicweb.web import uicfg, controller
 from cubicweb.web.action import Action
 from cubicweb.web.views import linksearch_select_url, vid_from_rset
 from cubicweb.web.views.autoform import AutomaticEntityForm
@@ -111,8 +112,8 @@
 
     def url(self):
         params = self.req.form.copy()
-        params.pop('vid', None)
-        params.pop('__message', None)
+        for param in ('vid', '__message') + controller.NAV_FORM_PARAMETERS:
+            params.pop(param, None)
         return self.build_url(self.req.relative_path(includeparams=False),
                               **params)