Changesets can be listed by changeset number.
The Git repository is here.
Changeset 425
The forum list now highlights forums containing topics with recent
replies even if sticky items are present. The topic updated date is
used for this too, to avoid having to make further changes to the
way that the forum change date was propagated. It's "more correct"
this way anyway.
- Comitted by: rool
- Date: Friday June 03 11:22:13 2011 (over 13 years ago)
Affected files:
rool/rails/beast/trunk/app/helpers/forums_helper.rb:
prev. | current | |
# used to know if a topic has changed since we read it last | ||
def recent_topic_activity(topic) | ||
5 | | |
5 | return false unless logged_in? | |
return topic.replied_at > (session[:topics][topic.id] || last_active) | ||
end | ||
# used to know if a forum has changed since we read it last | ||
def recent_forum_activity(forum) | ||
11 | | |
12 | | |
11 | return false unless logged_in? | |
12 | ||
13 | new_normal = forum.topics.find(:first, :conditions => {:sticky => 0}) | |
14 | new_sticky = forum.topics.find(:first, :conditions => {:sticky => 1}) | |
15 | ||
16 | return (!new_normal.nil? && recent_topic_activity(new_normal)) || | |
17 | (!new_sticky.nil? && recent_topic_activity(new_sticky)) | |
end | ||
14 | | |
end |