From faad2c9013b275998836c21384b8676ea0f72b62 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Feb 2015 17:40:27 +1100 Subject: [PATCH] Revert "FIX: when allow uncategorized was off we were still showing uncat for admins/mods" This reverts commit e8ca1f981823054471e0361e9b75cae5b9becdcd. --- app/assets/javascripts/discourse/views/topic.js.es6 | 2 +- app/models/site.rb | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse/views/topic.js.es6 b/app/assets/javascripts/discourse/views/topic.js.es6 index 758a8a06e10..772291a5134 100644 --- a/app/assets/javascripts/discourse/views/topic.js.es6 +++ b/app/assets/javascripts/discourse/views/topic.js.es6 @@ -126,7 +126,7 @@ var TopicView = Discourse.View.extend(AddCategoryClass, Discourse.Scrolling, { var opts = { latestLink: "" + I18n.t("topic.view_latest_topics") + "" }, category = this.get('controller.content.category'); - if(category && Em.get(category, 'id') === Discourse.Site.currentProp("uncategorized_category_id")) { + if(Em.get(category, 'id') === Discourse.Site.currentProp("uncategorized_category_id")) { category = null; } diff --git a/app/models/site.rb b/app/models/site.rb index 4d3c1590515..bfe31fb6e76 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -43,12 +43,7 @@ class Site .secured(@guardian) .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 + .to_a allowed_topic_create = Set.new(Category.topic_create_allowed(@guardian).pluck(:id))