Add new upload limit system (fix #4234).
This commit is contained in:
@@ -1279,6 +1279,9 @@ class Post < ApplicationRecord
|
||||
# XXX This must happen *after* the `is_deleted` flag is set to true (issue #3419).
|
||||
give_favorites_to_parent(options) if options[:move_favorites]
|
||||
|
||||
is_automatic = (reason == "Unapproved in three days")
|
||||
uploader.new_upload_limit.update_limit!(self, incremental: is_automatic)
|
||||
|
||||
unless options[:without_mod_action]
|
||||
ModAction.log("deleted post ##{id}, reason: #{reason}", :post_delete)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user