Merge pull request #20891 from owncloud/check-for-cli

Execute only for web and not for CLI
This commit is contained in:
Morris Jobke 2015-12-02 12:56:15 +01:00
commit 891f4f6d9c
1 changed files with 7 additions and 7 deletions

View File

@ -167,14 +167,14 @@ class OC {
// a web URL, so we use overwritewebroot as a fallback.
OC::$WEBROOT = OC_Config::getValue('overwritewebroot', '');
}
}
// Resolve /owncloud to /owncloud/ to ensure to always have a trailing
// slash which is required by URL generation.
if($_SERVER['REQUEST_URI'] === \OC::$WEBROOT &&
substr($_SERVER['REQUEST_URI'], -1) !== '/') {
header('Location: '.\OC::$WEBROOT.'/');
exit();
// Resolve /owncloud to /owncloud/ to ensure to always have a trailing
// slash which is required by URL generation.
if($_SERVER['REQUEST_URI'] === \OC::$WEBROOT &&
substr($_SERVER['REQUEST_URI'], -1) !== '/') {
header('Location: '.\OC::$WEBROOT.'/');
exit();
}
}
// search the 3rdparty folder