mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:50:11 +00:00
Remove event.adjust field
- It was confusing and introduced complexity that wasn't worth the unclear gain
This commit is contained in:
parent
6db211568a
commit
9935e8e711
24 changed files with 66 additions and 195 deletions
|
@ -408,7 +408,6 @@ class Processor
|
|||
$event['finish'] = $activity['end-time'];
|
||||
$event['nofinish'] = empty($event['finish']);
|
||||
$event['location'] = $activity['location'];
|
||||
$event['adjust'] = $activity['adjust'] ?? true;
|
||||
$event['cid'] = $item['contact-id'];
|
||||
$event['uid'] = $item['uid'];
|
||||
$event['uri'] = $item['uri'];
|
||||
|
|
|
@ -1389,7 +1389,6 @@ class Receiver
|
|||
$object_data = self::getSource($object, $object_data);
|
||||
$object_data['start-time'] = JsonLD::fetchElement($object, 'as:startTime', '@value');
|
||||
$object_data['end-time'] = JsonLD::fetchElement($object, 'as:endTime', '@value');
|
||||
$object_data['adjust'] = JsonLD::fetchElement($object, 'dfrn:adjust', '@value');
|
||||
$object_data['location'] = $location;
|
||||
$object_data['latitude'] = JsonLD::fetchElement($object, 'as:location', 'as:latitude', '@type', 'as:Place');
|
||||
$object_data['latitude'] = JsonLD::fetchElement($object_data, 'latitude', '@value');
|
||||
|
|
|
@ -1476,10 +1476,10 @@ class Transmitter
|
|||
$event = [];
|
||||
$event['name'] = $item['event-summary'];
|
||||
$event['content'] = BBCode::convertForUriId($item['uri-id'], $item['event-desc'], BBCode::ACTIVITYPUB);
|
||||
$event['startTime'] = DateTimeFormat::utc($item['event-start'] . '+00:00', DateTimeFormat::ATOM);
|
||||
$event['startTime'] = DateTimeFormat::utc($item['event-start'], 'c');
|
||||
|
||||
if (!$item['event-nofinish']) {
|
||||
$event['endTime'] = DateTimeFormat::utc($item['event-finish'] . '+00:00', DateTimeFormat::ATOM);
|
||||
$event['endTime'] = DateTimeFormat::utc($item['event-finish'], 'c');
|
||||
}
|
||||
|
||||
if (!empty($item['event-location'])) {
|
||||
|
@ -1487,7 +1487,8 @@ class Transmitter
|
|||
$event['location'] = self::createLocation($item);
|
||||
}
|
||||
|
||||
$event['dfrn:adjust'] = (bool)$item['event-adjust'];
|
||||
// 2021.12: Backward compatibility value, all the events now "adjust" to the viewer timezone
|
||||
$event['dfrn:adjust'] = true;
|
||||
|
||||
return $event;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue