mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 22:52:10 +08:00
Revert "FIX: when allow uncategorized was off we were still showing uncat for admins/mods"
This reverts commit e8ca1f9818
.
This commit is contained in:
parent
e8ca1f9818
commit
faad2c9013
|
@ -126,7 +126,7 @@ var TopicView = Discourse.View.extend(AddCategoryClass, Discourse.Scrolling, {
|
|||
var opts = { latestLink: "<a href=\"" + Discourse.getURL("/latest") + "\">" + I18n.t("topic.view_latest_topics") + "</a>" },
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user