mirror of
https://github.com/moebooru/moebooru
synced 2025-08-31 14:05:14 +00:00
another temp helper: pool:*
--HG-- branch : moe extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%4035
This commit is contained in:
@@ -164,9 +164,13 @@ module PostSqlMethods
|
||||
end
|
||||
|
||||
if q[:pool].is_a?(String)
|
||||
joins << "JOIN pools_posts ON pools_posts.post_id = p.id JOIN pools ON pools_posts.pool_id = pools.id"
|
||||
conds << "pools.name ILIKE ? ESCAPE E'\\\\'"
|
||||
cond_params << ("%" + q[:pool].to_escaped_for_sql_like + "%")
|
||||
if q[:pool] == "*" then
|
||||
joins << "JOIN pools_posts ON pools_posts.post_id = p.id JOIN pools ON pools_posts.pool_id = pools.id"
|
||||
else
|
||||
joins << "JOIN pools_posts ON pools_posts.post_id = p.id JOIN pools ON pools_posts.pool_id = pools.id"
|
||||
conds << "pools.name ILIKE ? ESCAPE E'\\\\'"
|
||||
cond_params << ("%" + q[:pool].to_escaped_for_sql_like + "%")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user