1
1
Fork 0

Merge pull request #6648 from annando/issue-6603

Issue 6603: Events are now fetchable via AP
This commit is contained in:
Hypolite Petovan 2019-02-13 07:46:41 -05:00 committed by GitHub
commit d96ace0224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,7 +245,8 @@ class Event extends BaseObject
$event['id'] = intval(defaults($arr, 'id' , 0)); $event['id'] = intval(defaults($arr, 'id' , 0));
$event['uid'] = intval(defaults($arr, 'uid' , 0)); $event['uid'] = intval(defaults($arr, 'uid' , 0));
$event['cid'] = intval(defaults($arr, 'cid' , 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['type'] = defaults($arr, 'type' , 'event');
$event['summary'] = defaults($arr, 'summary' , ''); $event['summary'] = defaults($arr, 'summary' , '');
$event['desc'] = defaults($arr, 'desc' , ''); $event['desc'] = defaults($arr, 'desc' , '');
@ -316,8 +317,6 @@ class Event extends BaseObject
Hook::callAll('event_updated', $event['id']); Hook::callAll('event_updated', $event['id']);
} else { } else {
$event['guid'] = defaults($arr, 'guid', System::createUUID());
// New event. Store it. // New event. Store it.
DBA::insert('event', $event); DBA::insert('event', $event);