mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FIX: PM should never be allowed to have a category
FIX: TL3 should not be allowed to muck with PM titles
This commit is contained in:
@ -513,6 +513,8 @@ class Topic < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def change_category_to_id(category_id)
|
||||
return false if private_message?
|
||||
|
||||
# If the category name is blank, reset the attribute
|
||||
if (category_id.nil? || category_id.to_i == 0)
|
||||
cat = Category.find_by(id: SiteSetting.uncategorized_category_id)
|
||||
|
Reference in New Issue
Block a user