Skip to content
Snippets Groups Projects
Commit da99e403 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Also fix linkToAbsolute

parent 6fe3fd4a
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,9 @@ class OC_Helper { ...@@ -78,7 +78,9 @@ class OC_Helper {
* Returns a absolute url to the given app and file. * Returns a absolute url to the given app and file.
*/ */
public static function linkToAbsolute($app, $file, $args = array()) { public static function linkToAbsolute($app, $file, $args = array()) {
return self::linkTo($app, $file, $args); return OC::$server->getURLGenerator()->getAbsoluteURL(
self::linkTo($app, $file, $args)
);
} }
/** /**
...@@ -112,8 +114,10 @@ class OC_Helper { ...@@ -112,8 +114,10 @@ class OC_Helper {
* Returns a absolute url to the given service. * Returns a absolute url to the given service.
*/ */
public static function linkToRemote($service, $add_slash = true) { public static function linkToRemote($service, $add_slash = true) {
return self::makeURLAbsolute(self::linkToRemoteBase($service)) return OC::$server->getURLGenerator()->getAbsoluteURL(
. (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : ''); self::linkToRemoteBase($service)
. (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '')
);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment