From 605fe4b11d3dce54f261e252e639fac26b609ae3 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 20 Mar 2015 12:14:14 -0400 Subject: [PATCH] Don't count moderator actions in the user directory stats --- app/models/directory_item.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/directory_item.rb b/app/models/directory_item.rb index 759e1b1d8..64361abb4 100644 --- a/app/models/directory_item.rb +++ b/app/models/directory_item.rb @@ -54,6 +54,7 @@ class DirectoryItem < ActiveRecord::Base AND p.deleted_at IS NULL AND NOT (COALESCE(p.hidden, false)) AND NOT COALESCE(c.read_restricted, false) + AND p.post_type != :moderator_action AND u.id > 0 GROUP BY u.id", period_type: period_types[period_type], @@ -61,6 +62,7 @@ class DirectoryItem < ActiveRecord::Base like_type: UserAction::LIKE, was_liked_type: UserAction::WAS_LIKED, new_topic_type: UserAction::NEW_TOPIC, - reply_type: UserAction::REPLY + reply_type: UserAction::REPLY, + moderator_action: Post.types[:moderator_action] end end