Store guid and plink with event (#5485)

* Store guid and plink with event

* One space too much
This commit is contained in:
Michael Vogel
2018-07-24 16:01:31 +02:00
committed by Hypolite Petovan
parent a44eeda463
commit be8b68aaaf
2 changed files with 3 additions and 1 deletions

View File

@@ -307,7 +307,7 @@ class Event extends BaseObject
Addon::callHooks('event_updated', $event['id']);
} else {
$event['guid'] = System::createGUID(32);
$event['guid'] = defaults($arr, 'guid', System::createGUID(32));
// New event. Store it.
DBA::insert('event', $event);
@@ -321,6 +321,7 @@ class Event extends BaseObject
$item_arr['uri'] = $event['uri'];
$item_arr['parent-uri'] = $event['uri'];
$item_arr['guid'] = $event['guid'];
$item_arr['plink'] = defaults($arr, 'plink', '');
$item_arr['post-type'] = Item::PT_EVENT;
$item_arr['wall'] = $event['cid'] ? 0 : 1;
$item_arr['contact-id'] = $contact['id'];