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:
Sam
2014-09-11 17:39:20 +10:00
parent f95611aba1
commit 0f585bcdbe
14 changed files with 47 additions and 19 deletions

View File

@ -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)