diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-06 22:15:55 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-07 20:43:00 +0200 |
commit | c4f1a1de5b5f9dda969a3b3872eea5628d8ef9e2 (patch) | |
tree | 39daafb3d1af62ea6d08059a0c1c53d45d96eeb8 /lib/util.php | |
parent | 6d0390dccaa02af0c5144733bf9c3e254e77fa9a (diff) | |
download | nextcloud-server-c4f1a1de5b5f9dda969a3b3872eea5628d8ef9e2.tar.gz nextcloud-server-c4f1a1de5b5f9dda969a3b3872eea5628d8ef9e2.zip |
Added function to make url absolute
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index f26fa63e446..4c5d416f9f2 100755 --- a/lib/util.php +++ b/lib/util.php @@ -348,7 +348,7 @@ class OC_Util { else { $defaultpage = OC_Appconfig::getValue('core', 'defaultpage'); if ($defaultpage) { - $location = OC_Helper::serverProtocol().'://'.OC_Helper::serverHost().OC::$WEBROOT.'/'.$defaultpage; + $location = OC_Helper::makeURLAbsolute(OC::$WEBROOT.'/'.$defaultpage); } else { $location = OC_Helper::linkToAbsolute( 'files', 'index.php' ); @@ -476,7 +476,7 @@ class OC_Util { @fclose($fp); // accessing the file via http - $url = OC_Helper::serverProtocol(). '://' . OC_Helper::serverHost() . OC::$WEBROOT.'/data'.$filename; + $url = OC_Helper::makeURLAbsolute(OC::$WEBROOT.'/data'.$filename); $fp = @fopen($url, 'r'); $content=@fread($fp, 2048); @fclose($fp); |