summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-12-02 11:49:33 +0100
committerLukas Reschke <lukas@owncloud.com>2015-12-02 11:49:33 +0100
commit4d9af08f12e6e5188bdee3f3860d5db473a86a16 (patch)
tree3a543b04798ec24f74be4e0b2a8adad1d91ba7c5 /lib/base.php
parent361093fb7bd21c0e83001ff0639a37056daec2ea (diff)
downloadnextcloud-server-4d9af08f12e6e5188bdee3f3860d5db473a86a16.tar.gz
nextcloud-server-4d9af08f12e6e5188bdee3f3860d5db473a86a16.zip
Execute only for web and not for CLI
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php14
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