summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-06 18:49:06 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-06 18:51:41 +0200
commitfe6450002d6059260c743f48b6f40378454fa1dc (patch)
treef373d737d78dcc7cc73a76c90db7fdfe5d9f1aa2 /lib
parente6759a980b3efe07c4a4c2e2769c2becc92df67d (diff)
downloadnextcloud-server-fe6450002d6059260c743f48b6f40378454fa1dc.tar.gz
nextcloud-server-fe6450002d6059260c743f48b6f40378454fa1dc.zip
Change hardcoded urls to use linkTo function
Diffstat (limited to 'lib')
-rwxr-xr-xlib/util.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 6e62ed9bf58..f26fa63e446 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -343,10 +343,16 @@ class OC_Util {
$location = $_REQUEST['redirect_url'];
}
else if (isset(OC::$REQUESTEDAPP) && !empty(OC::$REQUESTEDAPP)) {
- $location = OC::$WEBROOT.'/?app='.OC::$REQUESTEDAPP;
+ $location = OC_Helper::linkToAbsolute( OC::$REQUESTEDAPP, 'index.php' );
}
else {
- $location = OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', '?app=files');
+ $defaultpage = OC_Appconfig::getValue('core', 'defaultpage');
+ if ($defaultpage) {
+ $location = OC_Helper::serverProtocol().'://'.OC_Helper::serverHost().OC::$WEBROOT.'/'.$defaultpage;
+ }
+ else {
+ $location = OC_Helper::linkToAbsolute( 'files', 'index.php' );
+ }
}
OC_Log::write('core', 'redirectToDefaultPage: '.$location, OC_Log::DEBUG);
header( 'Location: '.$location );