mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: bulk relist
This commit is contained in:
@@ -11,7 +11,7 @@ class TopicsBulkAction
|
||||
def self.operations
|
||||
@operations ||= %w(change_category close archive change_notification_level
|
||||
reset_read dismiss_posts delete unlist archive_messages
|
||||
move_messages_to_inbox change_tags append_tags)
|
||||
move_messages_to_inbox change_tags append_tags relist)
|
||||
end
|
||||
|
||||
def self.register_operation(name, &block)
|
||||
@@ -115,6 +115,15 @@ class TopicsBulkAction
|
||||
end
|
||||
end
|
||||
|
||||
def relist
|
||||
topics.each do |t|
|
||||
if guardian.can_moderate?(t)
|
||||
t.update_status('visible', true, @user)
|
||||
@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