update_search_state in the publisher since it should be done whatever the controller
authorsylvain.thenault@logilab.fr
Wed, 11 Feb 2009 15:20:32 +0100
changeset 581 09f87f2c535e
parent 580 b453a6a1c3d1
child 582 0260b3b71d71
update_search_state in the publisher since it should be done whatever the controller
web/application.py
web/views/basecontrollers.py
--- a/web/application.py	Wed Feb 11 14:57:24 2009 +0100
+++ b/web/application.py	Wed Feb 11 15:20:32 2009 +0100
@@ -1,7 +1,7 @@
 """CubicWeb web client application object
 
 :organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
@@ -317,6 +317,7 @@
             try:
                 ctrlid, rset = self.url_resolver.process(req, path)
                 controller = self.select_controller(ctrlid, req)
+                req.update_search_state()
                 result = controller.publish(rset=rset)
                 if req.cnx is not None:
                     # req.cnx is None if anonymous aren't allowed and we are
--- a/web/views/basecontrollers.py	Wed Feb 11 14:57:24 2009 +0100
+++ b/web/views/basecontrollers.py	Wed Feb 11 15:20:32 2009 +0100
@@ -60,7 +60,6 @@
     
     def publish(self, rset=None):
         """publish a request, returning an encoded string"""
-        self.req.update_search_state()
         template = self.req.property_value('ui.main-template')
         if template not in self.vreg.registry('templates') :
             template = self.template