From 186426933d930bec27c0fd539083e75b17adc983 Mon Sep 17 00:00:00 2001 From: pblasquez Date: Thu, 28 Apr 2016 14:36:25 -0700 Subject: [PATCH] Allow for separate headers upon conditional --- html/includes/forms/update-config-item.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/includes/forms/update-config-item.inc.php b/html/includes/forms/update-config-item.inc.php index 2885a2a718..b943fbb5ca 100644 --- a/html/includes/forms/update-config-item.inc.php +++ b/html/includes/forms/update-config-item.inc.php @@ -11,9 +11,9 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ -header('Content-type: application/json'); if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -100,4 +100,5 @@ $response = array( 'status' => $status, 'message' => $message, ); +header('Content-type: application/json'); echo _json_encode($response);