summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-04 14:56:06 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-04 14:56:06 +0200
commit54d5d869ad2c525dd276f28a8409658a106d9e3f (patch)
treede619bb4824b61d41b0452a94fc850cc28b27e35 /application/controllers
parent720808fc3884a415dc483b50796697a095d1b5b8 (diff)
Generalize request_type() to static_storage()
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php6
-rw-r--r--application/controllers/user.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 6e660b306..6a97c645f 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -286,7 +286,7 @@ class File extends MY_Controller {
}
}
- if (request_type() == "json") {
+ if (static_storage("response_type") == "json") {
return send_json_reply($this->data["urls"]);
}
@@ -466,7 +466,7 @@ class File extends MY_Controller {
ORDER BY date $order
", array($user))->result_array();
- if (request_type() == "json") {
+ if (static_storage("response_type") == "json") {
return send_json_reply($query);
}
@@ -539,7 +539,7 @@ class File extends MY_Controller {
}
}
- if (request_type() == "json") {
+ if (static_storage("response_type") == "json") {
return send_json_reply(array(
"errors" => $errors,
"deleted" => $deleted,
diff --git a/application/controllers/user.php b/application/controllers/user.php
index 56f571d6a..34d6c492d 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -131,7 +131,7 @@ class User extends MY_Controller {
WHERE `user` = ? order by created desc
", array($userid))->result_array();
- if (request_type() == "json") {
+ if (static_storage("response_type") == "json") {
return send_json_reply($query);
}