Fix possible edge case

This commit is contained in:
Toks
2013-12-07 21:38:28 -05:00
parent 926a317bc2
commit 8386733341

View File

@@ -755,7 +755,7 @@ class Post < ActiveRecord::Base
if CurrentUser.safe_mode?
tags = "#{tags} rating:s".strip
end
if CurrentUser.user && CurrentUser.hide_deleted_posts?
if CurrentUser.user && CurrentUser.hide_deleted_posts? && tags !~ /(?:^|\s)(?:-)?status:.+/
tags = "#{tags} -status:deleted".strip
end