diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 2740c471e..9c97b6113 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -27,11 +27,7 @@ class PostsController < ApplicationController end def show - if CurrentUser.can_approve_posts? && (cookies[:moderated].blank? || Time.at(cookies[:moderated].to_i) < 1.day.ago) - flash[:notice] = "You haven't moderated any posts recently. Consider checking the queue." - #redirect_to(random_moderator_post_queue_path(:return_to => request.original_url)) - #return - end + notify_inactive_janitors @post = Post.find(params[:id]) @post_flag = PostFlag.new(:post_id => @post.id) @@ -118,6 +114,14 @@ class PostsController < ApplicationController end private + def notify_inactive_janitors + if CurrentUser.can_approve_posts? && flash[:notice].blank? && (cookies[:moderated].blank? || Time.at(cookies[:moderated].to_i) < 1.day.ago) + flash[:notice] = "You haven't moderated any posts recently. Consider checking the queue." + #redirect_to(random_moderator_post_queue_path(:return_to => request.original_url)) + #return + end + end + def tag_query params[:tags] || (params[:post] && params[:post][:tags]) end