aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-20 21:19:22 -0700
committerfriendica <info@friendica.com>2013-06-20 21:19:22 -0700
commit0b9337dffb8c7e65d6ec0fa6eda05f0f3d2451e3 (patch)
tree541b30f3251d9647e45849e7b2d6923bd24fb9e0 /include
parent58ac92f4e162abdad2d2f259bbf6c58029f65b86 (diff)
downloadvolse-hubzilla-0b9337dffb8c7e65d6ec0fa6eda05f0f3d2451e3.tar.gz
volse-hubzilla-0b9337dffb8c7e65d6ec0fa6eda05f0f3d2451e3.tar.bz2
volse-hubzilla-0b9337dffb8c7e65d6ec0fa6eda05f0f3d2451e3.zip
community tag issues
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 09e0f94fa..2e54b8707 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1860,15 +1860,18 @@ function tag_deliver($uid,$item_id) {
// FIXME --- If the item is deleted, remove the tag from the parent.
// (First ensure that deleted items use this function, or else do that part separately.)
+ logger('tag_deliver: community tag activity received');
+
if(($item['owner_xchan'] === $u[0]['channel_hash']) && (! get_pconfig($u[0]['channel_id'],'system','blocktags'))) {
$j_tgt = json_decode($item['target'],true);
- if($j_tgt && $j_tgt['mid']) {
+ if($j_tgt && $j_tgt['id']) {
$p = q("select * from item where mid = '%s' and uid = %d limit 1",
- dbesc($j_tgt['mid']),
+ dbesc($j_tgt['id']),
intval($u[0]['channel_id'])
);
if($p) {
$j_obj = json_decode($item['object'],true);
+ logger('tag_deliver: tag object: ' . print_r($j_obj,true), LOGGER_DATA);
if($j_obj && $j_obj['id'] && $j_obj['title']) {
store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j['obj']['id']);
proc_run('php','include/notifier.php','edit_post',$p[0]['id']);
@@ -1876,6 +1879,8 @@ function tag_deliver($uid,$item_id) {
}
}
}
+ else
+ logger('tag_deliver: tag permission denied for ' . $u[0]['channel_address']);
}
$terms = get_terms_oftype($item['term'],TERM_MENTION);