comparison gpp/forums/unread.py @ 407:42a4e66972d5

Trying to fix #200; found a bug in the get_forum_unread_status() function. Added some db indexes.
author Brian Neal <bgneal@gmail.com>
date Fri, 01 Apr 2011 01:18:44 +0000
parents e9a066db3f54
children 7e0997b08b50
comparison
equal deleted inserted replaced
406:f469261d617b 407:42a4e66972d5
99 99
100 for topic in topics: 100 for topic in topics:
101 if topic.id in tracked_dict: 101 if topic.id in tracked_dict:
102 if topic.update_date > tracked_dict[topic.id].last_visit: 102 if topic.update_date > tracked_dict[topic.id].last_visit:
103 forum.has_unread = True 103 forum.has_unread = True
104 continue 104 break
105 else: 105 else:
106 forum.has_unread = True 106 forum.has_unread = True
107 continue 107 break
108 108 else:
109 # If we made it through the above loop without continuing, then 109 # If we made it through the above loop without breaking out,
110 # we are all caught up. 110 # then we are all caught up.
111 forum.catchup(user, flv) 111 forum.catchup(user, flv)
112 forum.has_unread = False 112 forum.has_unread = False
113 113
114 ####################################################################### 114 #######################################################################
115 115
116 def get_topic_unread_status(forum, topics, user): 116 def get_topic_unread_status(forum, topics, user):
117 117