mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 01:25:21 +02:00
remote_user can now support multiple contacts being logged in at once
This commit is contained in:
parent
a9deda1e5e
commit
4cd8233f61
13 changed files with 226 additions and 73 deletions
|
@ -3702,9 +3702,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)) {
|
||||
|
||||
logger('delete item: ' . $item['id'], LOGGER_DEBUG);
|
||||
// delete the item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue