summaryrefslogtreecommitdiffstats
path: root/application/helpers/filebin_helper.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-03 15:49:46 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-03 15:49:46 +0200
commit26e2f14fb02bc6dd3df3e516f57a51b628a2e4c2 (patch)
tree8d6c7b87844b1319adab7f25d7ef5c7c51e0e513 /application/helpers/filebin_helper.php
parentfbd587a62dc1d84e4ebf3917ecdb86270ea8a48d (diff)
parent69e0cba93445496e7b045b54ecefe8243276fd50 (diff)
Merge branch 'working'
Diffstat (limited to 'application/helpers/filebin_helper.php')
-rw-r--r--application/helpers/filebin_helper.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php
index 4af106a14..9b124506f 100644
--- a/application/helpers/filebin_helper.php
+++ b/application/helpers/filebin_helper.php
@@ -326,14 +326,30 @@ function auth_driver_function_implemented($function)
function user_logged_in()
{
$CI =& get_instance();
+ $CI->load->model("muser");
return $CI->muser->logged_in();
}
-function send_json_reply($array)
+function send_json_reply($array, $status = "success")
{
+ $reply = array();
+ $reply["status"] = $status;
+ $reply["data"] = $array;
+
$CI =& get_instance();
$CI->output->set_content_type('application/json');
- $CI->output->set_output(json_encode($array));
+ $CI->output->set_output(json_encode($reply));
+}
+
+function request_type($set_type = null)
+{
+ static $type = null;
+
+ if ($set_type !== null) {
+ $type = $set_type;
+ }
+
+ return $type;
}
# vim: set noet: