Merge pull request #13307 from MrPetovan/bug/13240-event-private
Fix item.private value in Model\Event::getItemArrayForIdpull/13308/head
commit
f1da323b07
|
@ -344,7 +344,6 @@ class Event
|
||||||
$event['id'] = $event_id;
|
$event['id'] = $event_id;
|
||||||
|
|
||||||
$item['uid'] = $event['uid'];
|
$item['uid'] = $event['uid'];
|
||||||
$item['contact-id'] = $event['cid'];
|
|
||||||
$item['uri'] = $event['uri'];
|
$item['uri'] = $event['uri'];
|
||||||
$item['uri-id'] = ItemURI::getIdByURI($event['uri']);
|
$item['uri-id'] = ItemURI::getIdByURI($event['uri']);
|
||||||
$item['guid'] = $event['guid'];
|
$item['guid'] = $event['guid'];
|
||||||
|
@ -363,11 +362,10 @@ class Event
|
||||||
$item['allow_gid'] = $event['allow_gid'];
|
$item['allow_gid'] = $event['allow_gid'];
|
||||||
$item['deny_cid'] = $event['deny_cid'];
|
$item['deny_cid'] = $event['deny_cid'];
|
||||||
$item['deny_gid'] = $event['deny_gid'];
|
$item['deny_gid'] = $event['deny_gid'];
|
||||||
$item['private'] = intval($event['private'] ?? 0);
|
$item['private'] = $event['allow_cid'] && $event['allow_gid'] && $event['deny_cid'] && $event['deny_gid'] ? 0 : 1;
|
||||||
$item['visible'] = 1;
|
$item['visible'] = 1;
|
||||||
$item['verb'] = Activity::POST;
|
$item['verb'] = Activity::POST;
|
||||||
$item['object-type'] = Activity\ObjectType::EVENT;
|
$item['object-type'] = Activity\ObjectType::EVENT;
|
||||||
$item['post-type'] = Item::PT_EVENT;
|
|
||||||
$item['origin'] = $event['cid'] === 0 ? 1 : 0;
|
$item['origin'] = $event['cid'] === 0 ? 1 : 0;
|
||||||
$item['body'] = self::getBBCode($event);
|
$item['body'] = self::getBBCode($event);
|
||||||
$item['event-id'] = $event['id'];
|
$item['event-id'] = $event['id'];
|
||||||
|
|
|
@ -233,7 +233,7 @@ class Mail
|
||||||
foreach ($images as $image) {
|
foreach ($images as $image) {
|
||||||
$image_rid = Photo::ridFromURI($image);
|
$image_rid = Photo::ridFromURI($image);
|
||||||
if (!empty($image_rid)) {
|
if (!empty($image_rid)) {
|
||||||
Photo::update(['allow-cid' => '<' . $recipient . '>'], ['resource-id' => $image_rid, 'album' => 'Wall Photos', 'uid' => $sender_uid]);
|
Photo::update(['allow_cid' => '<' . $recipient . '>'], ['resource-id' => $image_rid, 'album' => 'Wall Photos', 'uid' => $sender_uid]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue