diff options
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/remote.php b/remote.php index b1be50f36a7..9fb73c4ce1d 100644 --- a/remote.php +++ b/remote.php @@ -21,9 +21,16 @@ if(is_null($file)){ exit; } -$parts=explode('/',$file); -$app=$parts[2]; -OC_App::loadApp($app); - -$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; -require_once(OC::$APPSROOT . $file); +if(count(explode('/',$file)) == 3) { + $parts=explode('/',$file); + $app=$parts[2]; + OC_App::loadApp($app); + $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; + require_once( OC::$SERVERROOT.$file); +} else { + $parts=explode('/', $file, 2); + $app=$parts[0]; + OC_App::loadApp($app); + $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; + require_once(OC_App::getAppPath($app) .'/'. $parts[1]); +} |