diff options
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/remote.php b/remote.php index 55b088d775e..e1e11c5773f 100644 --- a/remote.php +++ b/remote.php @@ -17,9 +17,17 @@ if(is_null($file)){ exit; } -$parts=explode('/', $file, 2); -$app=$parts[0]; -OC_App::loadApp($app); +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); -$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; -require_once(OC_App::getAppPath($app) .'/'. $parts[1]);
\ No newline at end of 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]); +} |