[views/tabs] fix rql/eid param conflict when either one is already in the request form (closes #2405249)
--- a/web/views/tabs.py Mon Jun 11 14:53:23 2012 +0200
+++ b/web/views/tabs.py Wed Jun 13 10:06:11 2012 +0200
@@ -47,7 +47,15 @@
"""a lazy version of wview"""
w = w or self.w
self._cw.add_js('cubicweb.ajax.js')
+ # the form is copied into urlparams to please the inner views
+ # that might want to take params from it
+ # beware of already present rql or eid elements
+ # to be safe of collision a proper argument passing protocol
+ # (with namespaces) should be used instead of the current
+ # ad-hockery
urlparams = self._cw.form.copy()
+ urlparams.pop('rql', None)
+ urlparams.pop('eid', None)
urlparams.update({'vid' : vid, 'fname' : 'view'})
if rql:
urlparams['rql'] = rql