From: Michael Vogel Date: Tue, 24 Jul 2018 14:01:31 +0000 (+0200) Subject: Store guid and plink with event (#5485) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be8b68aaaf83efa0e3cc10f5708209607c2b22b1;p=friendica.git Store guid and plink with event (#5485) * Store guid and plink with event * One space too much --- diff --git a/src/Model/Event.php b/src/Model/Event.php index da386a77b7..16d1ada27a 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -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']; diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 29d3e7bfe8..928f44e9c7 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2642,6 +2642,7 @@ class DFRN $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",