diff --git a/html/includes/forms/component.inc.php b/html/includes/forms/component.inc.php index 6492bbfb5b..1bf9beee6f 100644 --- a/html/includes/forms/component.inc.php +++ b/html/includes/forms/component.inc.php @@ -1,4 +1,5 @@ 0) { 'desc' => $group['desc'], 'pattern' => $group_split, ); + header('Content-type: application/json'); echo _json_encode($output); } diff --git a/html/includes/forms/parse-poller-groups.inc.php b/html/includes/forms/parse-poller-groups.inc.php index f9cac5ba1d..0fb09eea6c 100644 --- a/html/includes/forms/parse-poller-groups.inc.php +++ b/html/includes/forms/parse-poller-groups.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -24,5 +25,6 @@ if (is_numeric($group_id) && $group_id > 0) { 'group_name' => $group['group_name'], 'descr' => $group['descr'], ); + header('Content-type: application/json'); echo _json_encode($output); } diff --git a/html/includes/forms/poller-group-remove.inc.php b/html/includes/forms/poller-group-remove.inc.php index 0808fae9b9..5f40511dfa 100644 --- a/html/includes/forms/poller-group-remove.inc.php +++ b/html/includes/forms/poller-group-remove.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/poller-groups.inc.php b/html/includes/forms/poller-groups.inc.php index d7c14af04f..bce7048d04 100644 --- a/html/includes/forms/poller-groups.inc.php +++ b/html/includes/forms/poller-groups.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if (is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/poller-module-update.inc.php b/html/includes/forms/poller-module-update.inc.php index d276e373c1..452ab27975 100644 --- a/html/includes/forms/poller-module-update.inc.php +++ b/html/includes/forms/poller-module-update.inc.php @@ -1,4 +1,5 @@