mirror of
https://github.com/moebooru/moebooru
synced 2025-09-05 00:15:10 +00:00
holds:false to hide posts, for the api where the default is holds:all
--HG-- branch : moe extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%40732
This commit is contained in:
@@ -245,9 +245,12 @@ module PostSqlMethods
|
||||
conds << "p.status = 'flagged'"
|
||||
end
|
||||
|
||||
if q.has_key?(:show_holds_only)
|
||||
if q[:show_holds_only]
|
||||
if q.has_key?(:show_holds)
|
||||
if q[:show_holds] == :only
|
||||
conds << "p.is_held"
|
||||
elsif q[:show_holds] == :hide
|
||||
conds << "NOT p.is_held"
|
||||
elsif q[:show_holds] == :yes
|
||||
end
|
||||
else
|
||||
# Hide held posts by default only when not using the API.
|
||||
|
Reference in New Issue
Block a user