From e28ede19dce588fe22aecc77c3234da9133e00f4 Mon Sep 17 00:00:00 2001 From: Toks Date: Wed, 26 Mar 2014 13:20:22 -0400 Subject: [PATCH] fixes #2119 --- app/controllers/forum_topics_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/forum_topics_controller.rb b/app/controllers/forum_topics_controller.rb index 96a13dbe6..1fbf4e9e6 100644 --- a/app/controllers/forum_topics_controller.rb +++ b/app/controllers/forum_topics_controller.rb @@ -33,7 +33,9 @@ class ForumTopicsController < ApplicationController @forum_posts = ForumPost.search(:topic_id => @forum_topic.id).order("forum_posts.id").paginate(params[:page]) @forum_posts.all respond_with(@forum_topic) - session[:read_forum_topics] = @forum_topic.mark_as_read(read_forum_topic_ids) + unless CurrentUser.user.is_anonymous? + session[:read_forum_topics] = @forum_topic.mark_as_read(read_forum_topic_ids) + end end def create