summaryrefslogtreecommitdiffstats
path: root/lib/public/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/util.php')
-rw-r--r--lib/public/util.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index da4aa6e9deb..a9fe0e47de6 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -269,7 +269,10 @@ class Util {
* @since 4.0.0 - parameter $args was added in 4.5.0
*/
public static function linkToAbsolute( $app, $file, $args = array() ) {
- return(\OC_Helper::linkToAbsolute( $app, $file, $args ));
+ $urlGenerator = \OC::$server->getURLGenerator();
+ return $urlGenerator->getAbsoluteURL(
+ $urlGenerator->linkTo($app, $file, $args)
+ );
}
/**
@@ -279,7 +282,11 @@ class Util {
* @since 4.0.0
*/
public static function linkToRemote( $service ) {
- return(\OC_Helper::linkToRemote( $service ));
+ $urlGenerator = \OC::$server->getURLGenerator();
+ $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service;
+ return $urlGenerator->getAbsoluteURL(
+ $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '')
+ );
}
/**