Merge pull request #42 from davidtaylorhq/filter_parameters
Check discourse version before adding TopicQuery filters
This commit is contained in:
commit
5ce9f8319a
|
@ -337,6 +337,7 @@ SQL
|
|||
end
|
||||
end
|
||||
|
||||
if Discourse.has_needed_version?(Discourse::VERSION::STRING, '1.8.0.beta6')
|
||||
require_dependency 'topic_query'
|
||||
|
||||
TopicQuery.add_custom_filter(:solved) do |results, topic_query|
|
||||
|
@ -357,6 +358,7 @@ SQL
|
|||
end
|
||||
results
|
||||
end
|
||||
end
|
||||
|
||||
require_dependency 'topic_list_item_serializer'
|
||||
|
||||
|
|
Loading…
Reference in New Issue