From: Thomas Tanghus Date: Thu, 14 Jun 2012 10:48:42 +0000 (+0200) Subject: Don't add slash if it's there already. X-Git-Tag: v4.5.0beta1~74^2~420^2~31^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a34db3fbe00aa54a4d98bfab0d48ce03db8ee8c3;p=nextcloud-server.git Don't add slash if it's there already. --- diff --git a/lib/helper.php b/lib/helper.php index decc1d61336..fe6795d28ee 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -132,7 +132,7 @@ class OC_Helper { * Returns a absolute url to the given service. */ public static function linkToRemote( $service, $add_slash = true ) { - return self::linkToAbsolute( '', 'remote.php') . '/' . $service . ($add_slash?'/':''); + return self::linkToAbsolute( '', 'remote.php') . '/' . $service . (($add_slash && $service[strlen($service)-1]!='/')?'/':''); } /**