diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-12-03 14:42:14 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-12-03 14:42:14 +0100 |
commit | 1f69dcb593f2c282c2eab9f9327b84aad50f5a23 (patch) | |
tree | d5b72ae3db7da007345bb2490718cdd49576d203 /lib/base.php | |
parent | 0d6f02bac9f8f65cc8054c293c4cde27558ea323 (diff) | |
download | nextcloud-server-1f69dcb593f2c282c2eab9f9327b84aad50f5a23.tar.gz nextcloud-server-1f69dcb593f2c282c2eab9f9327b84aad50f5a23.zip |
Use URLGenerator instead of hard-coded WEBROOT
Fixes https://github.com/owncloud/core/issues/20922
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 4 |
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(); |