diff options
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index c17f346c2be..26d718da944 100644 --- a/lib/util.php +++ b/lib/util.php @@ -277,6 +277,16 @@ class OC_Util { /** + * Check if the app is enabled, send json error msg if not + */ + public static function checkAppEnabled($app){ + if( !OC_App::isEnabled($app)){ + header( 'Location: '.OC_Helper::linkTo( '', 'index.php' , true)); + exit(); + } + } + + /** * Check if the user is logged in, redirects to home if not */ public static function checkLoggedIn(){ |