mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 18:33:37 +08:00
FIX: Allow customized usernames to work in this route
Co-authored-by: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
parent
23f7c3607c
commit
83d8fa2892
|
@ -293,10 +293,11 @@ class ListController < ApplicationController
|
||||||
def page_params(opts = nil)
|
def page_params(opts = nil)
|
||||||
opts ||= {}
|
opts ||= {}
|
||||||
route_params = { format: 'json' }
|
route_params = { format: 'json' }
|
||||||
route_params[:category] = @category.slug_for_url if @category
|
route_params[:category] = @category.slug_for_url if @category
|
||||||
route_params[:parent_category] = @category.parent_category.slug_for_url if @category && @category.parent_category
|
route_params[:parent_category] = @category.parent_category.slug_for_url if @category && @category.parent_category
|
||||||
route_params[:order] = opts[:order] if opts[:order].present?
|
route_params[:order] = opts[:order] if opts[:order].present?
|
||||||
route_params[:ascending] = opts[:ascending] if opts[:ascending].present?
|
route_params[:ascending] = opts[:ascending] if opts[:ascending].present?
|
||||||
|
route_params[:username] = UrlHelper.escape_uri(params[:username]) if params[:username].present?
|
||||||
route_params
|
route_params
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user