$parts=explode('/',$file,2);
$app=$parts[0];
+OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);
require_once(OC_App::getAppPath($app) .'/'. $parts[1]);
if(count(explode('/',$file)) == 2) {
$parts=explode('/',$file);
- $app=$parts[1];
- OC_App::loadApp($app);
+ $app=$parts[0];
+ switch ($app) {
+ case 'files':
+ OC_Util::checkAppEnabled($app);
+ OC_App::loadApp($app);
+ break;
+ case 'core':
+ break;
+ default:
+ OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
+ exit;
+ }
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once( OC::$SERVERROOT.'/'.$file);
} else {
$parts=explode('/', $file, 2);
$app=$parts[0];
+ OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once(OC_App::getAppPath($app) .'/'. $parts[1]);