Ticket #1325: api.patch
| File api.patch, 1.3 kB (added by corvus, 1 year ago) |
|---|
-
/usr/lib/python2.3/site-packages/turbogears/visit/api.py
old new 135 135 set_current( None ) 136 136 return 137 137 138 visit= None138 visit=current() 139 139 cookies= cherrypy.request.simple_cookie 140 if self.cookie_name in cookies:141 # Process visit based on cookie142 visit_key= cookies[self.cookie_name].value143 visit= _manager.visit_for_key( visit_key )144 145 140 if not visit: 146 visit_key=self._generate_key() 147 visit= _manager.new_visit_with_key( visit_key ) 148 self.send_cookie( visit_key ) 141 if self.cookie_name in cookies: 142 # Process visit based on cookie 143 visit_key= cookies[self.cookie_name].value 144 visit= _manager.visit_for_key( visit_key ) 145 146 if not visit: 147 visit_key=self._generate_key() 148 visit= _manager.new_visit_with_key( visit_key ) 149 self.send_cookie( visit_key ) 149 150 150 set_current( visit )151 set_current( visit ) 151 152 152 153 # Inform all the plugins that a request has been made for the current 153 154 # visit. This gives plugins the opportunity to track click-path or