From a6ebfdb548b0e5674ffcc5ea8743d538a7aca138 Mon Sep 17 00:00:00 2001 From: Toks Date: Sat, 21 Dec 2013 23:20:51 -0500 Subject: [PATCH] #2068: Fix deleted posts not being included in count --- app/presenters/user_presenter.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index ea444ff8d..d9e216e29 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -98,7 +98,8 @@ class UserPresenter end def commented_posts_count(template) - template.link_to(Post.fast_count("commenter:#{user.name} order:comm"), template.posts_path(:tags => "commenter:#{user.name} order:comm")) + count = CurrentUser.without_safe_mode { Post.fast_count("commenter:#{user.name} order:comment") } + template.link_to(count, template.posts_path(:tags => "commenter:#{user.name} order:comment")) end def post_version_count(template) @@ -110,7 +111,8 @@ class UserPresenter end def noted_posts_count(template) - template.link_to(Post.fast_count("noteupdater:#{user.name} order:note"), template.posts_path(:tags => "noteupdater:#{user.name} order:note")) + count = CurrentUser.without_safe_mode { Post.fast_count("noteupdater:#{user.name} order:note") } + template.link_to(count, template.posts_path(:tags => "noteupdater:#{user.name} order:note")) end def wiki_page_version_count(template)