From 690f839619c09590459d39635af40a64057c2edf Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 23 Sep 2015 15:21:36 -0400 Subject: [PATCH] FIX: uncategorized topics list is 404 page when allow_uncategorized_topics is turned off --- .../javascripts/discourse/components/category-chooser.js.es6 | 2 +- app/models/site.rb | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/components/category-chooser.js.es6 b/app/assets/javascripts/discourse/components/category-chooser.js.es6 index df61b75ddeb..f5b85e79922 100644 --- a/app/assets/javascripts/discourse/components/category-chooser.js.es6 +++ b/app/assets/javascripts/discourse/components/category-chooser.js.es6 @@ -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 { diff --git a/app/models/site.rb b/app/models/site.rb index 6c4c05dfd8c..5f3cf7981df 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -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