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