diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2014-03-28 18:05:48 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2014-03-28 18:05:48 +0100 |
commit | c14107550d8c7588bb78e7ffc34c7190e475c23e (patch) | |
tree | 7b74b11d7741e49bc8cdbaa9f03b6ee7efe8908f /lib | |
parent | 0ae9ed4244d73f59077a70df0dbc800bd977e717 (diff) | |
download | nextcloud-server-c14107550d8c7588bb78e7ffc34c7190e475c23e.tar.gz nextcloud-server-c14107550d8c7588bb78e7ffc34c7190e475c23e.zip |
Use UrlGenerator in OC\Util::redirectToDefaultPage(). Fix #7936
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/private/util.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index c48a5505d41..c1adbaf2544 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -701,17 +701,18 @@ class OC_Util { * @return void */ public static function redirectToDefaultPage() { + $urlGenerator = \OC::$server->getURLGenerator(); if(isset($_REQUEST['redirect_url'])) { - $location = OC_Helper::makeURLAbsolute(urldecode($_REQUEST['redirect_url'])); + $location = $urlGenerator->getAbsoluteURL(urldecode($_REQUEST['redirect_url'])); } else if (isset(OC::$REQUESTEDAPP) && !empty(OC::$REQUESTEDAPP)) { - $location = OC_Helper::linkToAbsolute( OC::$REQUESTEDAPP, 'index.php' ); + $location = $urlGenerator->getAbsoluteURL('/index.php/apps/'.OC::$REQUESTEDAPP.'/index.php'); } else { $defaultPage = OC_Appconfig::getValue('core', 'defaultpage'); if ($defaultPage) { - $location = OC_Helper::makeURLAbsolute(OC::$WEBROOT.'/'.$defaultPage); + $location = $urlGenerator->getAbsoluteURL($defaultPage); } else { - $location = OC_Helper::linkToAbsolute( 'files', 'index.php' ); + $location = $urlGenerator->getAbsoluteURL('/index.php/files/index.php'); } } OC_Log::write('core', 'redirectToDefaultPage: '.$location, OC_Log::DEBUG); |