summaryrefslogtreecommitdiffstats
path: root/application/core/MY_Controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/core/MY_Controller.php')
-rw-r--r--application/core/MY_Controller.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php
index 312b0f763..e1c6cc96e 100644
--- a/application/core/MY_Controller.php
+++ b/application/core/MY_Controller.php
@@ -35,16 +35,16 @@ class MY_Controller extends CI_Controller {
// TODO: proper accept header handling or is this enough?
if (isset($_SERVER["HTTP_ACCEPT"])) {
if ($_SERVER["HTTP_ACCEPT"] == "application/json") {
- request_type("json");
+ static_storage("response_type", "json");
}
}
// Allow for easier testing in browser
if ($this->input->get("json") !== false) {
- request_type("json");
+ static_storage("response_type", "json");
}
- if (request_type() == "json" && ! in_array($this->uri->rsegment(2), $this->json_enabled_functions)) {
+ if (static_storage("response_type") == "json" && ! in_array($this->uri->rsegment(2), $this->json_enabled_functions)) {
show_error("Function not JSON enabled");
}