fixes #1538
This commit is contained in:
@@ -190,6 +190,12 @@ class PostQueryBuilder
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if q[:pool] == "none"
|
||||||
|
relation = relation.where("posts.pool_string = ''")
|
||||||
|
elsif q[:pool] == "any"
|
||||||
|
relation = relation.where("posts.pool_string != ''")
|
||||||
|
end
|
||||||
|
|
||||||
if q[:subscriptions]
|
if q[:subscriptions]
|
||||||
relation = add_tag_subscription_relation(q[:subscriptions], relation)
|
relation = add_tag_subscription_relation(q[:subscriptions], relation)
|
||||||
has_constraints!
|
has_constraints!
|
||||||
|
|||||||
@@ -379,7 +379,13 @@ class Tag < ActiveRecord::Base
|
|||||||
q[:tags][:exclude] << "pool:#{Pool.name_to_id($2)}"
|
q[:tags][:exclude] << "pool:#{Pool.name_to_id($2)}"
|
||||||
|
|
||||||
when "pool"
|
when "pool"
|
||||||
q[:tags][:related] << "pool:#{Pool.name_to_id($2)}"
|
if $2.downcase == "none"
|
||||||
|
q[:pool] = "none"
|
||||||
|
elsif $2.downcase == "any"
|
||||||
|
q[:pool] = "any"
|
||||||
|
else
|
||||||
|
q[:tags][:related] << "pool:#{Pool.name_to_id($2)}"
|
||||||
|
end
|
||||||
|
|
||||||
when "-fav"
|
when "-fav"
|
||||||
q[:tags][:exclude] << "fav:#{User.name_to_id($2)}"
|
q[:tags][:exclude] << "fav:#{User.name_to_id($2)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user