From: Michael Date: Wed, 13 Feb 2019 07:17:19 +0000 (+0000) Subject: Issue 6603: Events are now fetchable via AP X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=44ac0275ab3d42c661594d052e9346a9f238141e;p=friendica.git Issue 6603: Events are now fetchable via AP --- diff --git a/src/Model/Event.php b/src/Model/Event.php index 3ce86017ba..d9fbb27dd6 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -245,7 +245,8 @@ class Event extends BaseObject $event['id'] = intval(defaults($arr, 'id' , 0)); $event['uid'] = intval(defaults($arr, 'uid' , 0)); $event['cid'] = intval(defaults($arr, 'cid' , 0)); - $event['uri'] = defaults($arr, 'uri' , Item::newURI($event['uid'])); + $event['guid'] = defaults($arr, 'guid', System::createUUID()); + $event['uri'] = defaults($arr, 'uri' , Item::newURI($event['uid'], $event['guid'])); $event['type'] = defaults($arr, 'type' , 'event'); $event['summary'] = defaults($arr, 'summary' , ''); $event['desc'] = defaults($arr, 'desc' , ''); @@ -316,8 +317,6 @@ class Event extends BaseObject Hook::callAll('event_updated', $event['id']); } else { - $event['guid'] = defaults($arr, 'guid', System::createUUID()); - // New event. Store it. DBA::insert('event', $event);