Merge pull request #42 from davidtaylorhq/filter_parameters

Check discourse version before adding TopicQuery filters
This commit is contained in:
Sam 2017-02-27 16:24:56 -05:00 committed by GitHub
commit 5ce9f8319a
1 changed files with 19 additions and 17 deletions

View File

@ -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'