aboutsummaryrefslogtreecommitdiffstats
path: root/lib/json.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2011-10-03 22:59:40 +0100
committerTom Needham <needham.thomas@gmail.com>2011-10-03 22:59:40 +0100
commit02d7b1a1fc8f4bf62bfb973acfa0ee19ffa469ff (patch)
treedbf59263769a549a09f2aa5af3ccf2c9571bb125 /lib/json.php
parent0825073e8cac2a654bbc89b99b5a83cdfee7a836 (diff)
parente8c6252a4ce1151b11f1faa8e602c06aae4294d8 (diff)
downloadnextcloud-server-02d7b1a1fc8f4bf62bfb973acfa0ee19ffa469ff.tar.gz
nextcloud-server-02d7b1a1fc8f4bf62bfb973acfa0ee19ffa469ff.zip
Added breadcrumb and control bar.
Diffstat (limited to 'lib/json.php')
-rw-r--r--lib/json.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/json.php b/lib/json.php
index 5ebd6c6b759..cedf79fd7c3 100644
--- a/lib/json.php
+++ b/lib/json.php
@@ -11,7 +11,7 @@ class OC_JSON{
/**
* set Content-Type header to jsonrequest
*/
- public static function setContentTypeHeader($type='application/jsonrequest'){
+ public static function setContentTypeHeader($type='application/json'){
if (!self::$send_content_type_header){
// We send json data
header( 'Content-Type: '.$type );
@@ -20,6 +20,17 @@ class OC_JSON{
}
/**
+ * Check if the app is enabled, send json error msg if not
+ */
+ public static function checkAppEnabled($app){
+ if( !OC_App::isEnabled($app)){
+ $l = new OC_L10N('core');
+ self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled') )));
+ exit();
+ }
+ }
+
+ /**
* Check if the user is logged in, send json error msg if not
*/
public static function checkLoggedIn(){