From 194ba8fbee8b4c131cecbb341d3b6bffbcb37627 Mon Sep 17 00:00:00 2001 From: mensonge Date: Thu, 24 Jan 2008 08:08:58 +0000 Subject: [PATCH] interface design: normalize url when added (remove final '/') git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@27 b3834d28-1941-0410-a4f8-b48e95affb8f --- services/bookmarkservice.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/bookmarkservice.php b/services/bookmarkservice.php index 3181123..93dd06a 100644 --- a/services/bookmarkservice.php +++ b/services/bookmarkservice.php @@ -115,6 +115,9 @@ class BookmarkService { if (strpos($address, ':') === false) { $address = 'http://'. $address; } + if (substr($address, -1) == '/') { + $address = substr($address, 0, count($address)-2); + } // Get the client's IP address and the date; note that the date is in GMT. if (getenv('HTTP_CLIENT_IP'))