mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 12:27:16 +08:00
FEATURE: bypass topic bump when disable_category_edit_notifications is enabled (#14754)
This commit is contained in:
@ -387,8 +387,11 @@ class TopicsController < ApplicationController
|
||||
success = true
|
||||
|
||||
if changes.length > 0
|
||||
|
||||
bypass_bump = changes[:category_id].present? && SiteSetting.disable_category_edit_notifications
|
||||
|
||||
first_post = topic.ordered_posts.first
|
||||
success = PostRevisor.new(first_post, topic).revise!(current_user, changes, validate_post: false)
|
||||
success = PostRevisor.new(first_post, topic).revise!(current_user, changes, validate_post: false, bypass_bump: bypass_bump)
|
||||
|
||||
if !success && topic.errors.blank?
|
||||
topic.errors.add(:base, :unable_to_update)
|
||||
|
Reference in New Issue
Block a user