forked from GNUsocial/gnu-social
Don't double-insert a bookmark
This commit is contained in:
parent
8814fb3822
commit
0a56e88a64
@ -226,6 +226,13 @@ class Bookmark extends Memcached_DataObject
|
|||||||
$options = array();
|
$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)) {
|
if (is_string($rawtags)) {
|
||||||
$rawtags = preg_split('/[\s,]+/', $rawtags);
|
$rawtags = preg_split('/[\s,]+/', $rawtags);
|
||||||
}
|
}
|
||||||
@ -287,8 +294,6 @@ class Bookmark extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
$hashtags = array();
|
$hashtags = array();
|
||||||
$taglinks = array();
|
$taglinks = array();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user