aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index d88a676a1..6cef3d2cd 100644
--- a/include/items.php
+++ b/include/items.php
@@ -353,12 +353,13 @@ function can_comment_on_post($observer_xchan, $item) {
case 'specific':
case 'contacts':
case '':
- if(local_channel() && get_abconfig(local_channel(),$item['owner_xchan'],'their_perms','post_comments')) {
+ if(local_channel() && get_abconfig(local_channel(), (($item['verb'] === ACTIVITY_SHARE) ? $item['author_xchan'] : $item['owner_xchan']), 'their_perms', 'post_comments')) {
return true;
}
if(intval($item['item_wall']) && perm_is_allowed($item['uid'],$observer_xchan,'post_comments')) {
return true;
}
+
break;
default:
@@ -3920,16 +3921,19 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL) {
$notify_id = intval($item['id']);
- $items = q("select * from item where parent = %d and uid = %d",
+ $items = q("select id, resource_id, uid, resource_type, mid from item where parent = %d and uid = %d",
intval($item['id']),
intval($item['uid'])
);
+
if($items) {
- foreach($items as $i)
+ foreach($items as $i) {
delete_item_lowlevel($i, $stage);
+ }
}
- else
+ else {
delete_item_lowlevel($item, $stage);
+ }
if(! $interactive)
return 1;