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
This commit is contained in:
mensonge 2008-01-24 08:08:58 +00:00
parent 37ce70760b
commit 194ba8fbee

View file

@ -115,6 +115,9 @@ class BookmarkService {
if (strpos($address, ':') === false) { if (strpos($address, ':') === false) {
$address = 'http://'. $address; $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. // Get the client's IP address and the date; note that the date is in GMT.
if (getenv('HTTP_CLIENT_IP')) if (getenv('HTTP_CLIENT_IP'))