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);
$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'];
$ev["edited"] = $item["edited"];
$ev["private"] = $item["private"];
$ev["guid"] = $item["guid"];
+ $ev["plink"] = $item["plink"];
$r = q(
"SELECT `id` FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",