2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-11 21:04:42 +08:00

flagging work, we should be clearing from the mod menu if a topic or post is deleted

This commit is contained in:
Sam Saffron 2013-02-06 12:13:41 +11:00
parent 3fd019c6bd
commit 6f2f7b0589
5 changed files with 35 additions and 4 deletions

View file

@ -24,11 +24,14 @@ limit 100

sql.where2 "post_action_type_id in (:flag_types)", flag_types: PostActionType.FlagTypes


# it may make sense to add a view that shows flags on deleted posts,
# we don't clear the flags on post deletion, just supress counts
# they may have deleted_at on the action not set
if params[:filter] == 'old'
sql.where "p.deleted_at is null"
sql.where2 "deleted_at is not null"
else
sql.where "p.deleted_at is null"
sql.where "p.deleted_at is null and t.deleted_at is null"
sql.where2 "deleted_at is null"
end