Also fix linkToAbsolute
This commit is contained in:
parent
6fe3fd4a0b
commit
da99e403bc
1 changed files with 7 additions and 3 deletions
|
@ -78,7 +78,9 @@ class OC_Helper {
|
|||
* Returns a absolute url to the given app and file.
|
||||
*/
|
||||
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 {
|
|||
* Returns a absolute url to the given service.
|
||||
*/
|
||||
public static function linkToRemote($service, $add_slash = true) {
|
||||
return self::makeURLAbsolute(self::linkToRemoteBase($service))
|
||||
. (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '');
|
||||
return OC::$server->getURLGenerator()->getAbsoluteURL(
|
||||
self::linkToRemoteBase($service)
|
||||
. (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue