mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-25 05:23:36 -04:00
lower band check as well
This commit is contained in:
parent
8c74255cbb
commit
f625500792
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class TopicsController < ApplicationController
|
|||
end
|
||||
|
||||
page = params[:page].to_i
|
||||
if (page - 1) * SiteSetting.posts_per_page > @topic_view.topic.highest_post_number
|
||||
if (page < 0) || ((page - 1) * SiteSetting.posts_per_page > @topic_view.topic.highest_post_number)
|
||||
raise Discourse::NotFound
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue