2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FEATURE: remove support for 'suppress_from_latest' category setting. (#8308)

This commit is contained in:
Vinoth Kannan 2019-11-18 12:28:35 +05:30 committed by GitHub
parent 4e4844f4db
commit 3bb7ad4be1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 64 additions and 182 deletions

View file

@ -275,7 +275,6 @@ class ImportScripts::DiscuzX < ImportScripts::Base
description: row['description'],
position: row['position'].to_i + max_position,
color: color,
suppress_from_latest: (row['status'] == (0) || row['status'] == (3)),
post_create_action: lambda do |category|
if slug = @category_slug[row['id']]
category.update(slug: slug)
@ -295,6 +294,10 @@ class ImportScripts::DiscuzX < ImportScripts::Base
category.save!
end
end
if row['status'] == (0) || row['status'] == (3)
SiteSetting.default_categories_muted = [SiteSetting.default_categories_muted, category.id].reject(&:blank?).join("|")
end
category
end
}