aboutsummaryrefslogtreecommitdiffstats
path: root/mod/bookmarks.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-11 20:53:08 -0700
committerredmatrix <git@macgirvin.com>2016-04-11 20:53:08 -0700
commit09861abab7ba79f50801623f6dfc9d3278c40942 (patch)
tree13c092c3b60032ee3150cfc62c687f27a4891578 /mod/bookmarks.php
parent202035fc68d8b2364436cef75d68ac2a610e42c0 (diff)
downloadvolse-hubzilla-09861abab7ba79f50801623f6dfc9d3278c40942.tar.gz
volse-hubzilla-09861abab7ba79f50801623f6dfc9d3278c40942.tar.bz2
volse-hubzilla-09861abab7ba79f50801623f6dfc9d3278c40942.zip
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.
Diffstat (limited to 'mod/bookmarks.php')
-rw-r--r--mod/bookmarks.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/mod/bookmarks.php b/mod/bookmarks.php
index 02fe2f2e1..5c48ce5a9 100644
--- a/mod/bookmarks.php
+++ b/mod/bookmarks.php
@@ -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);
}
}