mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 20:45:35 +08:00
FEATURE Add reset bump dates bulk action (#16885)
This commit is contained in:
@ -14,7 +14,7 @@ class TopicsBulkAction
|
||||
@operations ||= %w(change_category close archive change_notification_level
|
||||
destroy_post_timing dismiss_posts delete unlist archive_messages
|
||||
move_messages_to_inbox change_tags append_tags remove_tags
|
||||
relist dismiss_topics)
|
||||
relist dismiss_topics reset_bump_dates)
|
||||
end
|
||||
|
||||
def self.register_operation(name, &block)
|
||||
@ -166,6 +166,15 @@ class TopicsBulkAction
|
||||
end
|
||||
end
|
||||
|
||||
def reset_bump_dates
|
||||
if guardian.can_update_bumped_at?
|
||||
topics.each do |t|
|
||||
t.reset_bumped_at
|
||||
@changed_ids << t.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def archive
|
||||
topics.each do |t|
|
||||
if guardian.can_moderate?(t)
|
||||
|
Reference in New Issue
Block a user