Commit 0d9553ed authored by Sebastian Kummer's avatar Sebastian Kummer

ZO-81 Transport note color in apppointment location, don't import/save

message if no body is transmitted by OL, color has hidden instance
SyncNote variable, set other appointment values: busystatus (free),
sensitivity (dafault), alldayevent (false), reminder (no), mettingstatus
(no meeting) and responserequested (no), send last modification
timestamp in dtstamp.
parent f98f21c5
......@@ -464,6 +464,7 @@ class MAPIMapping {
"lastmodified" => PR_LAST_MODIFICATION_TIME,
"messageclass" => PR_MESSAGE_CLASS,
"subject" => PR_SUBJECT,
"Color" => "PT_LONG:PSETID_Note:0x8B00",
);
}
......
......@@ -91,6 +91,13 @@ class ImportChangesStream implements IImportChanges {
// Acacia ZO-42: to sync Notes to Outlook we sync them as Appointments
if ($this->classAsString == "SyncNote" && ZPush::GetDeviceManager()->IsOutlookClient()) {
$appointment = new SyncAppointment();
$appointment->busystatus = 0;
$appointment->sensitivity = 0;
$appointment->alldayevent = 0;
$appointment->reminder = 0;
$appointment->meetingstatus = 0;
$appointment->responserequested = 0;
$appointment->flags = $message->flags;
if (isset($message->asbody))
$appointment->asbody = $message->asbody;
......@@ -98,8 +105,13 @@ class ImportChangesStream implements IImportChanges {
$appointment->categories = $message->categories;
if (isset($message->subject))
$appointment->subject = $message->subject;
// TODO color of the note
if (isset($message->lastmodified))
$appointment->dtstamp = $message->lastmodified;
if (isset($message->Color))
$appointment->location = $message->Color;
$appointment->starttime = time();
$appointment->endtime = $appointment->starttime + 1;
$message = $appointment;
}
......
......@@ -679,6 +679,7 @@ define("SYNC_NOTES_MESSAGECLASS", "Notes:MessageClass");
define("SYNC_NOTES_LASTMODIFIEDDATE", "Notes:LastModifiedDate");
define("SYNC_NOTES_CATEGORIES", "Notes:Categories");
define("SYNC_NOTES_CATEGORY", "Notes:Category");
define("SYNC_NOTES_IGNORE_COLOR","Notes:IgnoreColor");
//RightsManagement //post 14.0
define("SYNC_RIGHTSMANAGEMENT_SUPPORT", "RightsManagement:RightsManagementSupport");
......
......@@ -466,15 +466,23 @@ class Sync extends RequestProcessor {
$note->categories = $message->categories;
if (isset($message->subject))
$note->subject = $message->subject;
// TODO color of the note
if (isset($message->location))
$note->Color = $message->location;
$message = $note;
// on type change, OL sends messages without a body. Ignore these updates.
if (!isset($message->asbody)) {
$message = false;
}
}
else {
$message->Decode(self::$decoder);
// set Ghosted fields
$message->emptySupported(self::$deviceManager->GetSupportedFields($spa->GetFolderId()));
}
// set Ghosted fields
$message->emptySupported(self::$deviceManager->GetSupportedFields($spa->GetFolderId()));
if(!self::$decoder->getElementEndTag()) // end applicationdata
return false;
}
......
......@@ -52,6 +52,7 @@ class SyncNote extends SyncObject {
public $lastmodified;
public $messageclass;
public $subject;
public $Color;
function SyncNote() {
$mapping = array(
......@@ -67,6 +68,8 @@ class SyncNote extends SyncObject {
SYNC_NOTES_MESSAGECLASS => array ( self::STREAMER_VAR => "messageclass"),
SYNC_NOTES_SUBJECT => array ( self::STREAMER_VAR => "subject"),
SYNC_NOTES_IGNORE_COLOR => array ( self::STREAMER_VAR => "Color"),
);
parent::SyncObject($mapping);
......
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