[web request] don't define pageid js variable when one is found in form parameters (eg, page ajax call) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 12 May 2011 10:22:17 +0200
branchstable
changeset 7374 3c9850d929e5
parent 7373 e5e6ef56cfb5
child 7375 c8a8fb32733b
[web request] don't define pageid js variable when one is found in form parameters (eg, page ajax call)
web/data/cubicweb.ajax.js
web/request.py
web/views/basecontrollers.py
--- a/web/data/cubicweb.ajax.js	Wed May 11 19:03:16 2011 +0200
+++ b/web/data/cubicweb.ajax.js	Thu May 12 10:22:17 2011 +0200
@@ -1,4 +1,4 @@
-/* copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+/* copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
  * contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
  *
  * This file is part of CubicWeb.
--- a/web/request.py	Wed May 11 19:03:16 2011 +0200
+++ b/web/request.py	Thu May 12 10:22:17 2011 +0200
@@ -116,8 +116,8 @@
         pid = self.form.get('pageid')
         if pid is None:
             pid = make_uid(id(self))
+            self.html_headers.define_var('pageid', pid, override=False)
         self.pageid = pid
-        self.html_headers.define_var('pageid', pid, override=False)
 
     @property
     def authmode(self):
--- a/web/views/basecontrollers.py	Wed May 11 19:03:16 2011 +0200
+++ b/web/views/basecontrollers.py	Thu May 12 10:22:17 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.