Don't double-insert a bookmark

This commit is contained in:
Evan Prodromou 2010-12-27 22:57:11 -08:00
parent 8814fb3822
commit 0a56e88a64
1 changed files with 7 additions and 2 deletions

View File

@ -226,6 +226,13 @@ class Bookmark extends Memcached_DataObject
$options = array();
}
if (array_key_exists('uri', $options)) {
$other = Bookmark::staticGet('uri', $options['uri']);
if (!empty($other)) {
throw new ClientException(_('Bookmark already exists.'));
}
}
if (is_string($rawtags)) {
$rawtags = preg_split('/[\s,]+/', $rawtags);
}
@ -287,8 +294,6 @@ class Bookmark extends Memcached_DataObject
}
}
//
$hashtags = array();
$taglinks = array();