summaryrefslogtreecommitdiffstats
path: root/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'public.php')
-rw-r--r--public.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/public.php b/public.php
index f974e1c50d2..0581631f41f 100644
--- a/public.php
+++ b/public.php
@@ -1,5 +1,4 @@
<?php
-$RUNTIME_NOSETUPFS = true;
$RUNTIME_NOAPPS = TRUE;
require_once('lib/base.php');
$file = OCP\CONFIG::getAppValue('core', 'public_' . strip_tags($_GET['service']));
@@ -8,8 +7,10 @@ if(is_null($file)){
exit;
}
-$parts=explode('/',$file);
-$app=$parts[2];
+$parts=explode('/',$file,2);
+$app=$parts[0];
+
+OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);
-require_once(OC::$APPSROOT . $file);
+require_once(OC_App::getAppPath($app) .'/'. $parts[1]);