partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 5578d77139b7fc378bf7ac9d6cbc5fef3f919bdd
parent cda60551b88b1912f07964b548661f7c68ad3e4c
Author: Felicitus <felicitus@felicitus.org>
Date:   Thu, 22 Sep 2011 00:38:46 +0200

Minor modifications for JSONP

Diffstat:
Mfrontend/rest.php | 1+
Mfrontend/service.php | 6++++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/frontend/rest.php b/frontend/rest.php @@ -8,6 +8,7 @@ use de\RaumZeitLabor\PartKeepr\PartKeepr, include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); header("Content-Type: text/html; charset=UTF-8"); +header("Cache-Control: no-cache, must-revalidate"); PartKeepr::initialize(""); diff --git a/frontend/service.php b/frontend/service.php @@ -8,6 +8,7 @@ use de\RaumZeitLabor\PartKeepr\PartKeepr; include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); header("Content-Type: text/html; charset=UTF-8"); +header("Cache-Control: no-cache, must-revalidate"); PartKeepr::initialize(""); @@ -41,6 +42,11 @@ try { if (array_key_exists("type", $_REQUEST) && strtolower($_REQUEST["type"]) == "jsonp") { if (array_key_exists("callback", $_REQUEST)) { header('Content-Type: text/javascript'); + + if (array_key_exists("key", $_REQUEST)) { + $response["key"] = $_REQUEST["key"]; + } + echo $_REQUEST["callback"]."(".json_encode($response).")"; } } else {