Modified: branches/event_logging/app/helpers/application_helper.rb (1984 => 1985)
--- branches/event_logging/app/helpers/application_helper.rb 2008-11-18 15:12:49 UTC (rev 1984)
+++ branches/event_logging/app/helpers/application_helper.rb 2008-11-18 15:46:38 UTC (rev 1985)
@@ -1634,13 +1634,17 @@
# belonging to the user, favourited by the user, etc
# NB! only show this on the user's "home" page / profile page (never for the groups or "My Activity" feed on user profile page)
- if contributor.class.to_s == "User" && !contributor_initiated_actions_only
+ if contributor.class.to_s == "User" && (!contributor_news_only || (contributor_news_only && !contributor_initiated_actions_only))
# ==== Announcements ====
- # add site announcements to the event list; (this user with no friends who are site admins AND
+ # add site announcements to the event list; (this way users with no friends who are site admins AND
# who is not a member of any groups, where site admins are members too, will still get news
# entries about site announcements - which is very important
- site_announcements = ActivityLog.find(:all, :conditions => ["created_at > ? AND created_at < ? AND activity_loggable_type = ?", after, before, "Announcement"])
- events.concat(site_announcements)
+ #
+ # don't show site announcements on profile page news feeds
+ unless contributor_news_only
+ site_announcements = ActivityLog.find(:all, :conditions => ["created_at > ? AND created_at < ? AND activity_loggable_type = ?", after, before, "Announcement"])
+ events.concat(site_announcements)
+ end
# ==== User's Items ====