Fixed problems of header response of ajax. Tiquet: #2630

This commit is contained in:
m-lopez-f 2015-09-09 15:01:12 +02:00
parent 2f1ce917c9
commit cda76e17c1
2 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,9 @@ ob_clean();
$search_agents = (bool) get_parameter ('search_agents');
$get_agents_group = (bool) get_parameter('get_agents_group', false);
$force_local = (bool) get_parameter('force_local', false);
if ( https_is_running() ) {
header('Content-type: application/json');
}
if ($get_agents_group) {

View File

@ -34,6 +34,9 @@ $list_modules = (bool) get_parameter('list_modules', 0);
if ($get_plugin_macros) {
if ( https_is_running() ) {
header('Content-type: application/json');
}
$id_plugin = get_parameter('id_plugin', 0);
$plugin_macros = db_get_value('macros', 'tplugin', 'id',
@ -49,6 +52,9 @@ if ($get_plugin_macros) {
if ($search_modules) {
if ( https_is_running() ) {
header('Content-type: application/json');
}
$id_agents = json_decode(io_safe_output(get_parameter('id_agents')));
$filter = '%' . get_parameter('q', '') . '%';
$other_filter = json_decode(io_safe_output(get_parameter('other_filter')), true);