1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

[info-bar]modified cookie set for safari

This commit is contained in:
llj
2012-10-16 15:05:58 +08:00
parent ca409c5806
commit 49096665f6
2 changed files with 10 additions and 10 deletions

View File

@@ -41,14 +41,14 @@ class InfobarMiddleware(object):
return ret
def process_request(self, request):
topinfo_close = request.COOKIES.get('note_id', '')
topinfo_close = request.COOKIES.get('info_id', '')
cur_note = cache.get('CUR_TOPINFO') if cache.get('CUR_TOPINFO') else \
self.get_from_db()
if not cur_note:
request.cur_note = None
else:
if str(cur_note[0].id) in topinfo_close.split(','):
if str(cur_note[0].id) in topinfo_close.split('_'):
request.cur_note = None
else:
request.cur_note = cur_note[0]