From fd14dfb7b5dbcf084fb0c92503ce4f74fa4835dc Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 19 Feb 2013 12:31:25 -0500 Subject: [PATCH] forum fixes --- app/controllers/forum_posts_controller.rb | 6 +++++- app/views/forum_topics/index.html.erb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/forum_posts_controller.rb b/app/controllers/forum_posts_controller.rb index 2789d8aab..0cb56c33b 100644 --- a/app/controllers/forum_posts_controller.rb +++ b/app/controllers/forum_posts_controller.rb @@ -26,7 +26,11 @@ class ForumPostsController < ApplicationController def show @forum_post = ForumPost.find(params[:id]) - respond_with(@forum_post) + if request.format == "text/html" && @forum_post.id == @forum_post.topic.original_post.id + redirect_to(forum_topic_path(@forum_post.topic)) + else + respond_with(@forum_post) + end end def create diff --git a/app/views/forum_topics/index.html.erb b/app/views/forum_topics/index.html.erb index 8eb8b16ac..4509a8dfd 100644 --- a/app/views/forum_topics/index.html.erb +++ b/app/views/forum_topics/index.html.erb @@ -25,7 +25,7 @@ <%= link_to topic.title, forum_topic_path(topic) %> - <% if topic.response_count > 30 %> + <% if topic.response_count > Danbooru.config.posts_per_page %> <%= link_to "last", forum_topic_path(topic, :page => topic.last_page), :class => "last-page" %> <% end %>