Fix #4895: Deleted forum topics visible by default in index.
The bug was that since search parameters normally come from URL request parameters, a string value is expected here.
This commit is contained in:
@@ -17,7 +17,7 @@ class ForumTopicsController < ApplicationController
|
||||
def index
|
||||
if request.format.html?
|
||||
limit = params.fetch(:limit, 40)
|
||||
@forum_topics = authorize ForumTopic.visible(CurrentUser.user).paginated_search(params, limit: limit, defaults: { order: "sticky", is_deleted: false })
|
||||
@forum_topics = authorize ForumTopic.visible(CurrentUser.user).paginated_search(params, limit: limit, defaults: { order: "sticky", is_deleted: "false" })
|
||||
else
|
||||
@forum_topics = authorize ForumTopic.visible(CurrentUser.user).paginated_search(params)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user