mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Remove brackets from username_filters[]
URL
This commit is contained in:
parent
eef34eea80
commit
94917f47ed
2 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ Ember.DiscourseLocation = Ember.Object.extend({
|
|||
if (Em.isEmpty(params) || Em.isEmpty(Object.keys(params))) {
|
||||
return "";
|
||||
} else {
|
||||
return "?" + $.param(params).replace(/%5B/g, "[").replace(/%5D/g, "]");
|
||||
return "?" + decodeURIComponent($.param(params, true));
|
||||
}
|
||||
}.property('queryParams'),
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Discourse.TopicFromParamsRoute = Discourse.Route.extend({
|
|||
postStream.set('bestOf', Em.get(queryParams, 'filter') === 'best_of');
|
||||
|
||||
// Set any username filters on the postStream
|
||||
var userFilters = Em.get(queryParams, 'username_filters[]');
|
||||
var userFilters = Em.get(queryParams, 'username_filters') || Em.get(queryParams, 'username_filters[]');
|
||||
if (userFilters) {
|
||||
if (typeof userFilters === "string") { userFilters = [userFilters]; }
|
||||
userFilters.forEach(function (username) {
|
||||
|
|
Loading…
Reference in a new issue