Mailing List Archive

rt branch, 4.6/selectize-multiple-user-inputs, updated. rt-4.4.4-83-g180efa611
The branch, 4.6/selectize-multiple-user-inputs has been updated
via 180efa611037d9c329c156f8292bf14c05a05be8 (commit)
from dd79b9f5b5473e1bafcc7ca7fe0a71fab885ac70 (commit)

Summary of changes:
share/html/Helpers/Autocomplete/Users | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 180efa611037d9c329c156f8292bf14c05a05be8
Author: sunnavy <>
Date: Thu Jul 4 04:12:34 2019 +0800

Don't set content type for internal users autocomplete calls

Besides AJAX calls, /Helpers/Autocomplete/Users is also used internally
to get user info for selectize default options(in /Elements/EmailInput).
Thus always setting json http response content type is inappropriate.
$abort could be used to distinguish these 2 usages as we only set $abort
to 0 for internal usages.

This is not an issue in most cases as we flush buffer in
/Elements/PageLayout, where text/html content type is already sent to
browsers in advance. This is to get around issues for customized pages
without /Elements/PageLayout or an explicit flush_buffer call.

diff --git a/share/html/Helpers/Autocomplete/Users b/share/html/Helpers/Autocomplete/Users
index b2493cb70..1b45a20eb 100644
--- a/share/html/Helpers/Autocomplete/Users
+++ b/share/html/Helpers/Autocomplete/Users
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
-% $r->content_type('application/json; charset=utf-8');
+% $r->content_type('application/json; charset=utf-8') if $abort;
<% JSON( \@suggestions ) |n %>
% $m->abort if $abort;

rt-commit mailing list