summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-03 15:26:14 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-03 15:26:14 +0100
commit1fe7957fd0210c6a3f6ad5c810f1ba5814ff68d6 (patch)
tree817a12fa359a1c8278be6fd70d065169921cf5c1
parentec366f625ebfbe870d832fe1341966c5d6091827 (diff)
parent1f69dcb593f2c282c2eab9f9327b84aad50f5a23 (diff)
downloadnextcloud-server-1fe7957fd0210c6a3f6ad5c810f1ba5814ff68d6.tar.gz
nextcloud-server-1fe7957fd0210c6a3f6ad5c810f1ba5814ff68d6.zip
Merge pull request #20924 from owncloud/use-url-generator-to-generate-link
Use URLGenerator instead of hard-coded WEBROOT
-rw-r--r--lib/base.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index ed397d6a0e8..038c259ecf6 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -898,7 +898,7 @@ class OC {
// this is needed to prevent "Token expired" messages while login if a session is expired
// @see https://github.com/owncloud/core/pull/8443#issuecomment-42425583
if(isset($_GET['logout']) && !OC_User::isLoggedIn()) {
- header("Location: " . OC::$WEBROOT.(empty(OC::$WEBROOT) ? '/' : ''));
+ header("Location: " . \OC::$server->getURLGenerator()->getAbsoluteURL('/'));
return;
}
@@ -914,7 +914,7 @@ class OC {
}
OC_User::logout();
// redirect to webroot and add slash if webroot is empty
- header("Location: " . OC::$WEBROOT.(empty(OC::$WEBROOT) ? '/' : ''));
+ header("Location: " . \OC::$server->getURLGenerator()->getAbsoluteURL('/'));
} else {
// Redirect to default application
OC_Util::redirectToDefaultPage();