We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 0a56e88a authored by Evan Prodromou's avatar Evan Prodromou

Don't double-insert a bookmark

parent 8814fb38
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment