Merge pull request #10142 from annando/event-notice

Avoid notices when creating events
2022.09-rc
Hypolite Petovan 2021-04-11 06:44:13 -04:00 zatwierdzone przez GitHub
commit 61a53af48b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -489,7 +489,7 @@ function events_content(App $a)
$fdt = $orig_event['finish'] ?? 'now';
$tz = date_default_timezone_get();
if (!empty($orig_event)) {
if (isset($orig_event['adjust'])) {
$tz = ($orig_event['adjust'] ? date_default_timezone_get() : 'UTC');
}

Wyświetl plik

@ -293,11 +293,10 @@ class Event
}
$private = intval($arr['private'] ?? 0);
$conditions = ['uid' => $event['uid']];
if ($event['cid']) {
$conditions['id'] = $event['cid'];
$conditions = ['id' => $event['cid']];
} else {
$conditions['self'] = true;
$conditions = ['uid' => $event['uid'], 'self' => true];
}
$contact = DBA::selectFirst('contact', [], $conditions);