aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-04 16:06:56 -0800
committerfriendica <info@friendica.com>2014-02-04 16:06:56 -0800
commit3665bc38ef15137c7d36a12aa13a44c4d0304547 (patch)
tree7614ab347df65ca0c6712e098ffc555bdee3dc71 /include/items.php
parent46b9352a84a684d3e419604824f99105bea1272f (diff)
downloadvolse-hubzilla-3665bc38ef15137c7d36a12aa13a44c4d0304547.tar.gz
volse-hubzilla-3665bc38ef15137c7d36a12aa13a44c4d0304547.tar.bz2
volse-hubzilla-3665bc38ef15137c7d36a12aa13a44c4d0304547.zip
bookmarking
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 7b11a1c3c..860d714d1 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2169,6 +2169,21 @@ function tag_deliver($uid,$item_id) {
$item = $i[0];
+
+ $terms = get_terms_oftype($item['term'],TERM_BOOKMARK);
+
+ if($terms && (! $i[0]['item_restrict'])) {
+ logger('tag_deliver: found bookmark');
+ if(perm_is_allowed($u[0]['channel_id'],$i[0]['author_xchan'],'bookmark') && ($i[0]['author_xchan'] != $u[0]['channel_hash'])) {
+ require_once('include/bookmarks.php');
+ require_once('include/Contact.php');
+ $s = channelx_by_hash($i[0]['author_xchan']);
+ foreach($terms as $t) {
+ bookmark_add($u[0],$s[0],$t,$i[0]['item_private']);
+ }
+ }
+ }
+
if(($item['source_xchan']) && ($item['item_flags'] & ITEM_UPLINK) && ($item['item_flags'] & ITEM_THREAD_TOP) && ($item['edited'] != $item['created'])) {
// this is an update to a post which was already processed by us and has a second delivery chain
// Just start the second delivery chain to deliver the updated post