diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-24 08:06:42 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-24 08:06:42 +0000 |
commit | 0ab6e2ee3d88c9e2e3ada339ccd9b9f921d70598 (patch) | |
tree | f795441ed443c5a1c698da132b28ea1e458c589d /remote.php | |
parent | ca5de26bacf6d8a2245a8d916eaa642c3415bd5f (diff) | |
download | nextcloud-server-0ab6e2ee3d88c9e2e3ada339ccd9b9f921d70598.tar.gz nextcloud-server-0ab6e2ee3d88c9e2e3ada339ccd9b9f921d70598.zip |
Try to fix the remote pbm. fix oc-1090
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/remote.php b/remote.php index ef610f36947..976012dea5a 100644 --- a/remote.php +++ b/remote.php @@ -20,16 +20,19 @@ if(is_null($file)){ OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); exit; } -if(count(explode('/',$file)) == 3) { + +$file = ltrim ($file, '/'); + +if(count(explode('/',$file)) == 2) { $parts=explode('/',$file); - $app=$parts[2]; + $app=$parts[1]; OC_App::loadApp($app); $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; - require_once( OC::$SERVERROOT.$file); + require_once( OC::$SERVERROOT.'/'.$file); } else { - $parts=explode('/', $file, 4); - $app=$parts[2]; + $parts=explode('/', $file, 2); + $app=$parts[0]; OC_App::loadApp($app); $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; - require_once(OC_App::getAppPath($app) .'/'. $parts[3]); + require_once(OC_App::getAppPath($app) .'/'. $parts[1]); } |