diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-30 23:05:10 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-30 23:17:18 +0200 |
commit | f4782a76907cf010faf9f4cd7deb3a67a2d02de9 (patch) | |
tree | ff3236d0f2785bc6946e84a80e69cf65a1fd6559 /lib/json.php | |
parent | ddd359989909add47912ad358bec55a924907d81 (diff) | |
download | nextcloud-server-f4782a76907cf010faf9f4cd7deb3a67a2d02de9.tar.gz nextcloud-server-f4782a76907cf010faf9f4cd7deb3a67a2d02de9.zip |
Check if the application is actually enabled
Diffstat (limited to 'lib/json.php')
-rw-r--r-- | lib/json.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/json.php b/lib/json.php index 6ab0404c081..cedf79fd7c3 100644 --- a/lib/json.php +++ b/lib/json.php @@ -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(){ |