2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-31 05:55:11 +00:00

filter by file extension

--HG--
branch : moe
extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%4018
This commit is contained in:
petopeto
2010-05-02 23:02:19 +00:00
parent bb57bf7a33
commit 7f8dea877c
2 changed files with 8 additions and 1 deletions

View File

@@ -62,6 +62,11 @@ module PostSqlMethods
cond_params << q[:md5].split(/,/)
end
if q[:ext].is_a?(String)
conds << "p.file_ext IN (?)"
cond_params << q[:ext].downcase.split(/,/)
end
if q[:deleted_only] == true
conds << "p.status = 'deleted'"
else