mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
FIX: only send up to 100 selected tags in the tag search request to avoid sending a query string that's too long
This commit is contained in:
parent
b2b6dc68a6
commit
ce26f48f97
@ -109,12 +109,15 @@ export default Ember.TextField.extend({
|
|||||||
url: Discourse.getURL("/tags/filter/search"),
|
url: Discourse.getURL("/tags/filter/search"),
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: function (term) {
|
data: function (term) {
|
||||||
|
const selectedTags = self.get('tags');
|
||||||
const d = {
|
const d = {
|
||||||
q: term,
|
q: term,
|
||||||
limit: self.siteSettings.max_tag_search_results,
|
limit: self.siteSettings.max_tag_search_results,
|
||||||
categoryId: self.get('categoryId'),
|
categoryId: self.get('categoryId')
|
||||||
selected_tags: self.get('tags')
|
|
||||||
};
|
};
|
||||||
|
if (selectedTags) {
|
||||||
|
d.selected_tags = selectedTags.slice(0,100);
|
||||||
|
}
|
||||||
if (!self.get('everyTag')) {
|
if (!self.get('everyTag')) {
|
||||||
d.filterForInput = true;
|
d.filterForInput = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user