when saving bookmarks from a post allow choice of bookmark to be saved (default is all of them); this implements the backend. Additional work will be required on the front end or within plugins to make this happen.
This commit is contained in:
parent
202035fc68
commit
09861abab7
@ -4,6 +4,8 @@ function bookmarks_init(&$a) {
|
||||
if(! local_channel())
|
||||
return;
|
||||
$item_id = intval($_REQUEST['item']);
|
||||
$burl = trim($_REQUEST['burl']);
|
||||
|
||||
if(! $item_id)
|
||||
return;
|
||||
|
||||
@ -36,7 +38,14 @@ function bookmarks_init(&$a) {
|
||||
killme();
|
||||
}
|
||||
foreach($terms as $t) {
|
||||
bookmark_add($u,$s[0],$t,$item['item_private']);
|
||||
if($burl) {
|
||||
if($burl == $t['url']) {
|
||||
bookmark_add($u,$s[0],$t,$item['item_private']);
|
||||
}
|
||||
}
|
||||
else
|
||||
bookmark_add($u,$s[0],$t,$item['item_private']);
|
||||
|
||||
info( t('Bookmark added') . EOL);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user