Merge pull request #3434 from pblasquez/ajax_headers_3

Ajax headers for devices and pollers
This commit is contained in:
Neil Lathwood
2016-04-30 00:39:48 +01:00
13 changed files with 15 additions and 0 deletions
+1
View File
@@ -1,4 +1,5 @@
<?php
header('Content-type: application/json');
if (is_admin() === false) {
$response = array(
@@ -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');
@@ -1,4 +1,5 @@
<?php
header('Content-type: text/plain');
// FUA
@@ -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');
// FUA
@@ -13,6 +13,7 @@
*/
if (is_admin() === false) {
header('Content-type: text/plain');
die('ERROR: You need to be admin');
}
@@ -34,5 +35,6 @@ if (is_numeric($group_id) && $group_id > 0) {
'desc' => $group['desc'],
'pattern' => $group_split,
);
header('Content-type: application/json');
echo _json_encode($output);
}
@@ -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);
}
@@ -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');
@@ -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');
@@ -1,4 +1,5 @@
<?php
header('Content-type: text/plain');
if(is_admin() === false) {
die('ERROR: You need to be admin');
@@ -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: application/json');
if (is_admin() === false) {
$response = array(
@@ -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: application/json');
$status = 'error';
@@ -9,6 +9,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: application/json');
$status = 'error';
$message = 'unknown error';
+1
View File
@@ -1,4 +1,5 @@
<?php
header('Content-type: application/json');
if (is_admin() === false) {
$response = array(