]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't add slash if it's there already.
authorThomas Tanghus <thomas@tanghus.net>
Thu, 14 Jun 2012 10:48:42 +0000 (12:48 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Thu, 14 Jun 2012 11:23:12 +0000 (13:23 +0200)
lib/helper.php

index decc1d61336f6fbe5450c6ce1a29aa4d4a285dc5..fe6795d28eeb44e0a5e8631b1ac1d0398f7f9834 100644 (file)
@@ -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]!='/')?'/':'');
        }
 
        /**