diff --git a/app/models/forum_post.rb b/app/models/forum_post.rb index 0a239d6ce..1c65a1f3d 100644 --- a/app/models/forum_post.rb +++ b/app/models/forum_post.rb @@ -120,7 +120,7 @@ class ForumPost < ActiveRecord::Base end def forum_topic_page - ((ForumPost.where("topic_id = ? and created_at <= ?", topic_id, created_at).count) / Danbooru.config.posts_per_page.to_f).ceil + ((ForumPost.where("topic_id = ? and created_at <= ?", topic_id, created_at).count) / CurrentUser.user.per_page.to_f).ceil end def is_original_post? diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index c78e0b4e8..a82c8ac86 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -56,7 +56,7 @@ class ForumTopic < ActiveRecord::Base end def last_page - (posts.count / Danbooru.config.posts_per_page.to_f).ceil + (posts.count / CurrentUser.user.per_page.to_f).ceil end def presenter(forum_posts)