Changeset View
Changeset View
Standalone View
Standalone View
lib/kolab_sync_data_calendar.php
Show First 20 Lines • Show All 339 Lines • ▼ Show 20 Lines | // 'CHAIR' => self::ATTENDEE_TYPE_RESOURCE, | ||||
* @param string $folderid Folder identifier | * @param string $folderid Folder identifier | ||||
* @param array $entry Existing entry | * @param array $entry Existing entry | ||||
* @param DateTimeZone $timezone Timezone of the event | * @param DateTimeZone $timezone Timezone of the event | ||||
* | * | ||||
* @return array | * @return array | ||||
*/ | */ | ||||
public function toKolab(Syncroton_Model_IEntry $data, $folderid, $entry = null, $timezone = null) | public function toKolab(Syncroton_Model_IEntry $data, $folderid, $entry = null, $timezone = null) | ||||
{ | { | ||||
$foldername = isset($entry['_mailbox']) ? $entry['_mailbox'] : $this->getFolderName($folderid); | |||||
machniak: After you removed $event this line needs to change. | |||||
if (empty($entry)) { | |||||
// If we don't have an existing event (not a modification) we nevertheless check for conflicts. | |||||
// This is necessary so we don't overwrite the server-side copy in case the client did not have it available | |||||
// when generating an Add command. | |||||
try { | |||||
$folder = $this->getFolderObject($foldername); | |||||
$entry = $folder->get_object($data->uID); | |||||
if ($entry) { | |||||
$this->logger->debug('Found and existing event for UID: ' . $data->uID); | |||||
} | |||||
} catch (Exception $e) { | |||||
// uID is not available on exceptions, so we guard for that and silently ignore. | |||||
} | |||||
} | |||||
$event = !empty($entry) ? $entry : array(); | $event = !empty($entry) ? $entry : array(); | ||||
$foldername = isset($event['_mailbox']) ? $event['_mailbox'] : $this->getFolderName($folderid); | |||||
$config = $this->getFolderConfig($foldername); | $config = $this->getFolderConfig($foldername); | ||||
$is_exception = $data instanceof Syncroton_Model_EventException; | $is_exception = $data instanceof Syncroton_Model_EventException; | ||||
$dummy_tz = str_repeat('A', 230) . '=='; | $dummy_tz = str_repeat('A', 230) . '=='; | ||||
$is_outlook = stripos($this->device->devicetype, 'outlook') !== false; | $is_outlook = stripos($this->device->devicetype, 'outlook') !== false; | ||||
// check data validity | // check data validity | ||||
$this->check_event($data); | $this->check_event($data); | ||||
▲ Show 20 Lines • Show All 751 Lines • Show Last 20 Lines |
After you removed $event this line needs to change.