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())
|
if(! local_channel())
|
||||||
return;
|
return;
|
||||||
$item_id = intval($_REQUEST['item']);
|
$item_id = intval($_REQUEST['item']);
|
||||||
|
$burl = trim($_REQUEST['burl']);
|
||||||
|
|
||||||
if(! $item_id)
|
if(! $item_id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -36,7 +38,14 @@ function bookmarks_init(&$a) {
|
|||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
foreach($terms as $t) {
|
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);
|
info( t('Bookmark added') . EOL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user