Merge pull request #20891 from owncloud/check-for-cli
Execute only for web and not for CLI
This commit is contained in:
commit
891f4f6d9c
14
lib/base.php
14
lib/base.php
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue