mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Don't set topic timer for close topics when changing category.
https://meta.discourse.org/t/moving-a-topic-after-closure-reopens-topic/67659/4
This commit is contained in:
@ -216,7 +216,8 @@ class Topic < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def inherit_auto_close_from_category
|
||||
if !@ignore_category_auto_close &&
|
||||
if !self.closed &&
|
||||
!@ignore_category_auto_close &&
|
||||
self.category &&
|
||||
self.category.auto_close_hours &&
|
||||
!public_topic_timer&.execute_at
|
||||
@ -1010,7 +1011,7 @@ SQL
|
||||
topic_timer.status_type = status_type
|
||||
|
||||
if time.blank?
|
||||
topic_timer.trash!(trashed_by: by_user || Discourse.system_user)
|
||||
topic_timer.trash!(by_user || Discourse.system_user)
|
||||
return
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user