Fix indentation
This commit is contained in:
parent
c99ac18b89
commit
05a0fd8aab
1 changed files with 30 additions and 29 deletions
|
@ -2102,43 +2102,44 @@ $("#rcmfd_new_category").keypress(function(event) {
|
||||||
if ($organizer === null && !empty($event['organizer'])) {
|
if ($organizer === null && !empty($event['organizer'])) {
|
||||||
$organizer = $event['organizer'];
|
$organizer = $event['organizer'];
|
||||||
$organizer['role'] = 'ORGANIZER';
|
$organizer['role'] = 'ORGANIZER';
|
||||||
if (!is_array($event['attendees']))
|
if (!is_array($event['attendees'])) {
|
||||||
$event['attendees'] = [$organizer];
|
$event['attendees'] = [$organizer];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Convert HTML description into plain text
|
// Convert HTML description into plain text
|
||||||
if ($this->is_html($event)) {
|
if ($this->is_html($event)) {
|
||||||
$h2t = new rcube_html2text($event['description'], false, true, 0);
|
$h2t = new rcube_html2text($event['description'], false, true, 0);
|
||||||
$event['description'] = trim($h2t->get_text());
|
$event['description'] = trim($h2t->get_text());
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapping url => vurl, allday => allDay because of the fullcalendar client script
|
// mapping url => vurl, allday => allDay because of the fullcalendar client script
|
||||||
$event['vurl'] = $event['url'];
|
$event['vurl'] = $event['url'];
|
||||||
$event['allDay'] = !empty($event['allday']);
|
$event['allDay'] = !empty($event['allday']);
|
||||||
unset($event['url']);
|
unset($event['url']);
|
||||||
unset($event['allday']);
|
unset($event['allday']);
|
||||||
|
|
||||||
$event['className'] = !empty($event['className']) ? explode(' ', $event['className']) : [];
|
$event['className'] = !empty($event['className']) ? explode(' ', $event['className']) : [];
|
||||||
|
|
||||||
if ($event['allDay']) {
|
if ($event['allDay']) {
|
||||||
$event['end'] = $event['end']->add(new DateInterval('P1D'));
|
$event['end'] = $event['end']->add(new DateInterval('P1D'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_GET['mode']) && $_GET['mode'] == 'print') {
|
if (!empty($_GET['mode']) && $_GET['mode'] == 'print') {
|
||||||
$event['editable'] = false;
|
$event['editable'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'_id' => $event['calendar'] . ':' . $event['id'], // unique identifier for fullcalendar
|
'_id' => $event['calendar'] . ':' . $event['id'], // unique identifier for fullcalendar
|
||||||
'start' => $this->lib->adjust_timezone($event['start'], $event['allDay'])->format('c'),
|
'start' => $this->lib->adjust_timezone($event['start'], $event['allDay'])->format('c'),
|
||||||
'end' => $this->lib->adjust_timezone($event['end'], $event['allDay'])->format('c'),
|
'end' => $this->lib->adjust_timezone($event['end'], $event['allDay'])->format('c'),
|
||||||
// 'changed' might be empty for event recurrences (Bug #2185)
|
// 'changed' might be empty for event recurrences (Bug #2185)
|
||||||
'changed' => !empty($event['changed']) ? $this->lib->adjust_timezone($event['changed'])->format('c') : null,
|
'changed' => !empty($event['changed']) ? $this->lib->adjust_timezone($event['changed'])->format('c') : null,
|
||||||
'created' => !empty($event['created']) ? $this->lib->adjust_timezone($event['created'])->format('c') : null,
|
'created' => !empty($event['created']) ? $this->lib->adjust_timezone($event['created'])->format('c') : null,
|
||||||
'title' => strval($event['title']),
|
'title' => strval($event['title']),
|
||||||
'description' => strval($event['description']),
|
'description' => strval($event['description']),
|
||||||
'location' => strval($event['location']),
|
'location' => strval($event['location']),
|
||||||
] + $event;
|
] + $event;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue