mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 19:08:15 +00:00
Merge pull request #2936 from pblasquez/pblasquez-application_json_patch
application/json headers
This commit is contained in:
commit
e884e72ca8
@ -55,5 +55,5 @@ $response = array(
|
||||
'html' => $output,
|
||||
'title' => $title,
|
||||
);
|
||||
|
||||
header('Content-type: application/json');
|
||||
echo _json_encode($response);
|
||||
|
@ -29,6 +29,7 @@ if (!$_SESSION['authenticated']) {
|
||||
|
||||
if (preg_match('/^[a-zA-Z0-9\-]+$/', $_POST['type']) == 1) {
|
||||
if (file_exists('includes/forms/'.$_POST['type'].'.inc.php')) {
|
||||
header('Content-type: application/json');
|
||||
include_once 'includes/forms/'.$_POST['type'].'.inc.php';
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ function levsort($base, $obj) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
header('Content-type: application/json');
|
||||
$obj = array(array('name' => 'Error: No suggestions found.'));
|
||||
$term = array();
|
||||
$current = false;
|
||||
|
@ -19,7 +19,7 @@ $bgp = array();
|
||||
|
||||
if (isset($_REQUEST['search'])) {
|
||||
$search = mres($_REQUEST['search']);
|
||||
|
||||
header('Content-type: application/json');
|
||||
if (strlen($search) > 0) {
|
||||
$found = 0;
|
||||
|
||||
|
@ -36,6 +36,7 @@ $response = array();
|
||||
|
||||
if (isset($id)) {
|
||||
if (file_exists("includes/table/$id.inc.php")) {
|
||||
header('Content-type: application/json');
|
||||
include_once "includes/table/$id.inc.php";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user