mirror of
https://github.com/moebooru/moebooru
synced 2025-08-31 14:05:14 +00:00
fixup pool_posts:orig
--HG-- branch : moe extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%4036
This commit is contained in:
@@ -139,14 +139,12 @@ module PostSqlMethods
|
|||||||
end
|
end
|
||||||
|
|
||||||
if q.has_key?(:pool)
|
if q.has_key?(:pool)
|
||||||
if q.has_key?(:pool_posts)
|
if q.has_key?(:pool_posts) and q[:pool_posts] == "all"
|
||||||
if q[:pool_posts] == "all"
|
conds << "(pools_posts.active OR pools_posts.master_id IS NOT NULL)"
|
||||||
conds << "(pools_posts.active OR pools_posts.master_id IS NOT NULL)"
|
elsif q.has_key?(:pool_posts) and q[:pool_posts] == "master"
|
||||||
elsif q[:pool_posts] == "master"
|
conds << "(pools_posts.master_id IS NOT NULL)"
|
||||||
conds << "(pools_posts.master_id IS NOT NULL)"
|
elsif q.has_key?(:pool_posts) and q[:pool_posts] == "slave"
|
||||||
elsif q[:pool_posts] == "slave"
|
conds << "(pools_posts.active AND pools_posts.slave_id IS NOT NULL)"
|
||||||
conds << "(pools_posts.active AND pools_posts.slave_id IS NOT NULL)"
|
|
||||||
end
|
|
||||||
elsif q.has_key?(:pool_posts) && q[:pool_posts] == "orig"
|
elsif q.has_key?(:pool_posts) && q[:pool_posts] == "orig"
|
||||||
conds << "pools_posts.active = true"
|
conds << "pools_posts.active = true"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user