# HG changeset patch # User Aurelien Campeas # Date 1233158285 -3600 # Node ID 459e50669d965f38b184e202fb16b6dab83a1ab4 # Parent a2fca6cdc5ffc4df6cbcffd071fafa03b4e61b20 [tabs] cookie name par cube instance will reduce cookie collisions diff -r a2fca6cdc5ff -r 459e50669d96 web/views/tabs.py --- a/web/views/tabs.py Wed Jan 28 16:53:09 2009 +0100 +++ b/web/views/tabs.py Wed Jan 28 16:58:05 2009 +0100 @@ -55,10 +55,11 @@ def active_tab(self, tabs, default): cookie = self.req.get_cookie() - activetab = cookie.get('active_tab') + cookiename = '%s_active_tab' % self.config.appid + activetab = cookie.get(cookiename) if activetab is None: - cookie['active_tab'] = default - self.req.set_cookie(cookie, 'active_tab') + cookie[cookiename] = default + self.req.set_cookie(cookie, cookiename) tab = default else: tab = activetab.value @@ -112,8 +113,9 @@ def js_remember_active_tab(self, tabname): cookie = self.req.get_cookie() - cookie['active_tab'] = tabname - self.req.set_cookie(cookie, 'active_tab') + cookiename = '%s_active_tab' % self.config.appid + cookie[cookiename] = tabname + self.req.set_cookie(cookie, cookiename) def js_lazily(self, vid_eid): vid, eid = vid_eid.split('-')