mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Respect query params for latest.rss (#10350)
Apparently latest.json and latest.rss are not routed to the same controller methods. This change allows for any passed in query parameters to actually be applied to the rss route. This came in as a request on meta: https://meta.discourse.org/t/-/155812/6
This commit is contained in:
@ -176,11 +176,13 @@ class ListController < ApplicationController
|
||||
def latest_feed
|
||||
discourse_expires_in 1.minute
|
||||
|
||||
options = { order: 'created' }.merge(build_topic_list_options)
|
||||
|
||||
@title = "#{SiteSetting.title} - #{I18n.t("rss_description.latest")}"
|
||||
@link = "#{Discourse.base_url}/latest"
|
||||
@atom_link = "#{Discourse.base_url}/latest.rss"
|
||||
@description = I18n.t("rss_description.latest")
|
||||
@topic_list = TopicQuery.new(nil, order: 'created').list_latest
|
||||
@topic_list = TopicQuery.new(nil, options).list_latest
|
||||
|
||||
render 'list', formats: [:rss]
|
||||
end
|
||||
|
Reference in New Issue
Block a user