aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php14
1 files changed, 13 insertions, 1 deletions
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