diff --git a/plugin.rb b/plugin.rb index 197a78f..302ee3a 100644 --- a/plugin.rb +++ b/plugin.rb @@ -341,14 +341,14 @@ SQL require_dependency 'topic_query' TopicQuery.add_custom_filter(:solved) do |results, topic_query| - if topic_query.options[:solved] == 'solved' + if topic_query.options[:solved] == 'yes' results = results.where("topics.id IN ( SELECT tc.topic_id FROM topic_custom_fields tc WHERE tc.name = 'accepted_answer_post_id' AND tc.value IS NOT NULL )") - elsif topic_query.options[:solved] == 'unsolved' + elsif topic_query.options[:solved] == 'no' results = results.where("topics.id NOT IN ( SELECT tc.topic_id FROM topic_custom_fields tc