FIX: uncategorized topics list is 404 page when allow_uncategorized_topics is turned off

This commit is contained in:
Neil Lalonde 2015-09-23 15:21:36 -04:00
parent 4d6c99cb3d
commit 690f839619
2 changed files with 1 additions and 5 deletions

View File

@ -36,7 +36,7 @@ export default ComboboxView.extend({
@computed("rootNone")
none(rootNone) {
if (Discourse.User.currentProp('staff') || Discourse.SiteSettings.allow_uncategorized_topics) {
if (Discourse.SiteSettings.allow_uncategorized_topics) {
if (rootNone) {
return "category.none";
} else {

View File

@ -44,10 +44,6 @@ class Site
.includes(:topic_only_relative_url)
.order(:position)
unless SiteSetting.allow_uncategorized_topics
categories = categories.where('categories.id <> ?', SiteSetting.uncategorized_category_id)
end
categories = categories.to_a
with_children = Set.new