Fix linkToPublic. Refs #8218

This commit is contained in:
Thomas Tanghus 2014-04-15 23:04:35 +02:00
parent 2dbb2db7e0
commit 6fe3fd4a0b

View file

@ -125,8 +125,12 @@ class OC_Helper {
* Returns a absolute url to the given service. * Returns a absolute url to the given service.
*/ */
public static function linkToPublic($service, $add_slash = false) { public static function linkToPublic($service, $add_slash = false) {
return self::linkToAbsolute('', 'public.php') . '?service=' . $service return OC::$server->getURLGenerator()->getAbsoluteURL(
. (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : ''); self::linkTo(
'', 'public.php') . '?service=' . $service
. (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : ''
)
);
} }
/** /**