From f4782a76907cf010faf9f4cd7deb3a67a2d02de9 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 30 Sep 2011 23:05:10 +0200 Subject: Check if the application is actually enabled --- lib/json.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/json.php') diff --git a/lib/json.php b/lib/json.php index 6ab0404c081..cedf79fd7c3 100644 --- a/lib/json.php +++ b/lib/json.php @@ -19,6 +19,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 */ -- cgit v1.2.3