diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-12-02 12:56:15 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-02 12:56:15 +0100 |
commit | 891f4f6d9c804f1c372433a8c4bd0ae3e9ee63c7 (patch) | |
tree | 3a543b04798ec24f74be4e0b2a8adad1d91ba7c5 | |
parent | 361093fb7bd21c0e83001ff0639a37056daec2ea (diff) | |
parent | 4d9af08f12e6e5188bdee3f3860d5db473a86a16 (diff) | |
download | nextcloud-server-891f4f6d9c804f1c372433a8c4bd0ae3e9ee63c7.tar.gz nextcloud-server-891f4f6d9c804f1c372433a8c4bd0ae3e9ee63c7.zip |
Merge pull request #20891 from owncloud/check-for-cli
Execute only for web and not for CLI
-rw-r--r-- | lib/base.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/base.php b/lib/base.php index 8c68b887a05..ed397d6a0e8 100644 --- a/lib/base.php +++ b/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 |