From 3ebb4a3dc7a369e7a716ab93d02b44b20522080f Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 9 Sep 2012 21:17:06 -0700 Subject: updates --- include/items.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 63e9a646d..4acf72d77 100755 --- a/include/items.php +++ b/include/items.php @@ -3557,9 +3557,21 @@ function drop_item($id,$interactive = true) { $owner = $item['uid']; + $cid = 0; + // check if logged in user is either the author or owner of this item - if((local_user() == $item['uid']) || (remote_user() == $item['contact-id']) || (! $interactive)) { + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $visitor) { + if($visitor['uid'] == $item['uid'] && $visitor['cid'] == $item['contact-id']) { + $cid = $visitor['cid']; + break; + } + } + } + + + if((local_user() == $item['uid']) || ($cid) || (! $interactive)) { // delete the item -- cgit v1.2.3