"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/jobs/regular/publish_topic_to_category.rb" between
discourse-2.5.2.tar.gz and discourse-2.5.3.tar.gz

About: Discourse is a "next-generation" forum platform for community discussions.

publish_topic_to_category.rb  (discourse-2.5.2):publish_topic_to_category.rb  (discourse-2.5.3)
skipping to change at line 12 skipping to change at line 12
module Jobs module Jobs
class PublishTopicToCategory < ::Jobs::Base class PublishTopicToCategory < ::Jobs::Base
def execute(args) def execute(args)
topic_timer = TopicTimer.find_by(id: args[:topic_timer_id] || args[:topic_ status_update_id]) topic_timer = TopicTimer.find_by(id: args[:topic_timer_id] || args[:topic_ status_update_id])
return if topic_timer.blank? return if topic_timer.blank?
topic = topic_timer.topic topic = topic_timer.topic
return if topic.blank? return if topic.blank?
return unless Guardian.new(topic_timer.user).can_see?(topic)
TopicTimer.transaction do TopicTimer.transaction do
TopicPublisher.new(topic, Discourse.system_user, topic_timer.category_id ).publish! TopicPublisher.new(topic, Discourse.system_user, topic_timer.category_id ).publish!
end end
Topic.find(topic.id).inherit_auto_close_from_category Topic.find(topic.id).inherit_auto_close_from_category
end end
end end
end end
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)