Commit f98f21c5 authored by Sebastian Kummer's avatar Sebastian Kummer

ZO-81 Transport Notes as Appointments.

parent 1a43ed4f
...@@ -88,19 +88,19 @@ class ImportChangesStream implements IImportChanges { ...@@ -88,19 +88,19 @@ class ImportChangesStream implements IImportChanges {
return false; return false;
} }
// Acacia ZO-42: to sync Notes to Outlook we sync them as Tasks // Acacia ZO-42: to sync Notes to Outlook we sync them as Appointments
if ($this->classAsString == "SyncNote" && ZPush::GetDeviceManager()->IsOutlookClient()) { if ($this->classAsString == "SyncNote" && ZPush::GetDeviceManager()->IsOutlookClient()) {
$task = new SyncTask(); $appointment = new SyncAppointment();
$task->flags = $message->flags; $appointment->flags = $message->flags;
if (isset($message->asbody)) if (isset($message->asbody))
$task->asbody = $message->asbody; $appointment->asbody = $message->asbody;
if (isset($message->categories)) if (isset($message->categories))
$task->categories = $message->categories; $appointment->categories = $message->categories;
if (isset($message->subject)) if (isset($message->subject))
$task->subject = $message->subject; $appointment->subject = $message->subject;
// TODO color of the note // TODO color of the note
$message = $task; $message = $appointment;
} }
// prevent sending the same object twice in one request // prevent sending the same object twice in one request
......
...@@ -283,8 +283,8 @@ class Ping extends RequestProcessor { ...@@ -283,8 +283,8 @@ class Ping extends RequestProcessor {
*/ */
private function isClassValid($class, $spa) { private function isClassValid($class, $spa) {
if ($class == $spa->GetContentClass() || if ($class == $spa->GetContentClass() ||
// Acacia ZO-42: Notes are synched as Tasks // Acacia ZO-42: Notes are synched as Appointments
(self::$deviceManager->IsOutlookClient() && $class == "Tasks" && $spa->GetContentClass() == "Notes") (self::$deviceManager->IsOutlookClient() && $class == "Calendar" && $spa->GetContentClass() == "Notes")
) { ) {
return true; return true;
} }
......
...@@ -453,10 +453,10 @@ class Sync extends RequestProcessor { ...@@ -453,10 +453,10 @@ class Sync extends RequestProcessor {
if(($el = self::$decoder->getElementStartTag(SYNC_DATA)) && ($el[EN_FLAGS] & EN_FLAGS_CONTENT)) { if(($el = self::$decoder->getElementStartTag(SYNC_DATA)) && ($el[EN_FLAGS] & EN_FLAGS_CONTENT)) {
$message = ZPush::getSyncObjectFromFolderClass($spa->GetContentClass()); $message = ZPush::getSyncObjectFromFolderClass($spa->GetContentClass());
// Acacia ZO-42: OL sends Notes as Tasks // Acacia ZO-42: OL sends Notes as Appointments
if ($spa->GetContentClass() == "Notes" && self::$deviceManager->IsOutlookClient()) { if ($spa->GetContentClass() == "Notes" && self::$deviceManager->IsOutlookClient()) {
ZLog::Write(LOGLEVEL_DEBUG, "HandleSync(): Outlook sends Notes as Tasks, read as Tasks and convert it into a SyncNote object."); ZLog::Write(LOGLEVEL_DEBUG, "HandleSync(): Outlook sends Notes as Appointments, read as SyncAppointment and convert it into a SyncNote object.");
$message = new SyncTask(); $message = new SyncAppointment();
$message->Decode(self::$decoder); $message->Decode(self::$decoder);
$note = new SyncNote(); $note = new SyncNote();
......
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