diff options
author | kondou <kondou@ts.unde.re> | 2014-09-04 19:51:38 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2014-09-04 20:44:50 +0200 |
commit | ecc9b42e4143773e4a850d6ee385328b16cda813 (patch) | |
tree | 06eb3ab650a82c270be4b42da24a493e897ed744 /lib/private/helper.php | |
parent | a10411d2bc3f98b8a0f2fa99563328ccf4605d0b (diff) | |
download | nextcloud-server-ecc9b42e4143773e4a850d6ee385328b16cda813.tar.gz nextcloud-server-ecc9b42e4143773e4a850d6ee385328b16cda813.zip |
Match \OC_Helper::linkToPublic() to new links and fit unittests
Diffstat (limited to 'lib/private/helper.php')
-rw-r--r-- | lib/private/helper.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php index 7c1edd1b058..f696b5a8900 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -129,12 +129,12 @@ class OC_Helper { * Returns a absolute url to the given service. */ public static function linkToPublic($service, $add_slash = false) { - return OC::$server->getURLGenerator()->getAbsoluteURL( - self::linkTo( - '', 'public.php') . '?service=' . $service - . (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '' - ) - ); + if ($service === 'files') { + $url = OC::$server->getURLGenerator()->getAbsoluteURL('/s'); + } else { + $url = OC::$server->getURLGenerator()->getAbsoluteURL(self::linkTo('', 'public.php').'?service='.$service); + } + return $url . (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : ''); } /** |