/forum_topics.json: add search[id]=<ids> param.
This commit is contained in:
@@ -72,6 +72,10 @@ class ForumTopic < ActiveRecord::Base
|
|||||||
q = permitted
|
q = permitted
|
||||||
return q if params.blank?
|
return q if params.blank?
|
||||||
|
|
||||||
|
if params[:id].present?
|
||||||
|
q = q.where(id: params[:id].split(",").map(&:to_i))
|
||||||
|
end
|
||||||
|
|
||||||
if params[:mod_only].present?
|
if params[:mod_only].present?
|
||||||
q = q.where("min_level >= ?", MIN_LEVELS[:Moderator])
|
q = q.where("min_level >= ?", MIN_LEVELS[:Moderator])
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user