Commit b4f6bf32 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #594 in ZP/z-push from develop to release/2.3

* commit '42642206':
  ZP-1286 Unable to delete an appointment on mobile phone.
  ZP-1285 Missed other instance of timezone lookup in Recurrence -- fixed. Note: Needs more eyeballs; this appears correct but the original code goes back a *long* way, and until recently I had not noted problems with time zone conversion.  Why it failed now, but not before, is not clear.
  ZP-1285 Fix the call to GMT conversion for DTSTART and DTEND conversion from DAVICAL events to ActiveSync format.  The timezone initialization passed was the ActiveSync one, which PHP does not know and thus failed to index properly for daylight savings time.  Replace with the check for a valid PHP time zone field from the Davical server and, if invalid, use the system default.
parents 60f42182 42642206
...@@ -557,7 +557,7 @@ class BackendCalDAV extends BackendDiff { ...@@ -557,7 +557,7 @@ class BackendCalDAV extends BackendDiff {
if (count($rec) > 0) { if (count($rec) > 0) {
$recurrence_id = reset($rec); $recurrence_id = reset($rec);
$exception = new SyncAppointmentException(); $exception = new SyncAppointmentException();
$tzid = TimezoneUtil::ParseTimezone($recurrence_id->GetParameterValue("TZID")); $tzid = TimezoneUtil::GetPhpSupportedTimezone($recurrence_id->GetParameterValue("TZID"));
if (!$tzid) { if (!$tzid) {
$tzid = $timezone; $tzid = $timezone;
} }
...@@ -594,7 +594,7 @@ class BackendCalDAV extends BackendDiff { ...@@ -594,7 +594,7 @@ class BackendCalDAV extends BackendDiff {
break; break;
case "DTSTART": case "DTSTART":
$message->starttime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::ParseTimezone($property->GetParameterValue("TZID"))); $message->starttime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::GetPhpSupportedTimezone($property->GetParameterValue("TZID")));
if (strlen($property->Value()) == 8) { if (strlen($property->Value()) == 8) {
$message->alldayevent = "1"; $message->alldayevent = "1";
} }
...@@ -622,7 +622,7 @@ class BackendCalDAV extends BackendDiff { ...@@ -622,7 +622,7 @@ class BackendCalDAV extends BackendDiff {
break; break;
case "DTEND": case "DTEND":
$message->endtime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::ParseTimezone($property->GetParameterValue("TZID"))); $message->endtime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::GetPhpSupportedTimezone($property->GetParameterValue("TZID")));
if (strlen($property->Value()) == 8) { if (strlen($property->Value()) == 8) {
$message->alldayevent = "1"; $message->alldayevent = "1";
} }
......
...@@ -457,7 +457,7 @@ class ImportChangesICS implements IImportChanges { ...@@ -457,7 +457,7 @@ class ImportChangesICS implements IImportChanges {
list(,$sk) = Utils::SplitMessageId($id); list(,$sk) = Utils::SplitMessageId($id);
// check if message is in the synchronization interval and/or shared+private // check if message is in the synchronization interval and/or shared+private
if (!$this->isModificationAllowed($id)) if (!$this->isModificationAllowed($sk))
throw new StatusException(sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Message deletion is not allowed. Deletion not executed.", $id), SYNC_STATUS_OBJECTNOTFOUND); throw new StatusException(sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Message deletion is not allowed. Deletion not executed.", $id), SYNC_STATUS_OBJECTNOTFOUND);
// check for conflicts // check for conflicts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment