mirror of
https://github.com/discourse/discourse.git
synced 2026-08-27 05:37:29 -05:00
Merge pull request #1673 from aperrault/patch-04
Fixing neglect to determine whether a user has the permission to create ...
This commit is contained in:
@@ -11,6 +11,9 @@ class ListController < ApplicationController
|
||||
user = list_target_user
|
||||
list = TopicQuery.new(user, list_opts).public_send("list_#{filter}")
|
||||
list.more_topics_url = construct_url_with(filter, list_opts)
|
||||
if list_opts.include?(:category)
|
||||
list.category = Category.where(name: list_opts[:category]).first
|
||||
end
|
||||
if [:latest, :hot].include?(filter)
|
||||
@description = SiteSetting.site_description
|
||||
@rss = filter
|
||||
@@ -51,6 +54,7 @@ class ListController < ApplicationController
|
||||
query = TopicQuery.new(current_user, list_opts)
|
||||
list = query.list_latest
|
||||
list.more_topics_url = construct_url_with(:latest, list_opts)
|
||||
list.category = @category if @category
|
||||
respond(list)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user