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 { ...@@ -464,6 +464,7 @@ class MAPIMapping {
"lastmodified" => PR_LAST_MODIFICATION_TIME, "lastmodified" => PR_LAST_MODIFICATION_TIME,
"messageclass" => PR_MESSAGE_CLASS, "messageclass" => PR_MESSAGE_CLASS,
"subject" => PR_SUBJECT, "subject" => PR_SUBJECT,
"Color" => "PT_LONG:PSETID_Note:0x8B00",
); );
} }
......
...@@ -91,6 +91,13 @@ class ImportChangesStream implements IImportChanges { ...@@ -91,6 +91,13 @@ class ImportChangesStream implements IImportChanges {
// Acacia ZO-42: to sync Notes to Outlook we sync them as Appointments // 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()) {
$appointment = new SyncAppointment(); $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; $appointment->flags = $message->flags;
if (isset($message->asbody)) if (isset($message->asbody))
$appointment->asbody = $message->asbody; $appointment->asbody = $message->asbody;
...@@ -98,8 +105,13 @@ class ImportChangesStream implements IImportChanges { ...@@ -98,8 +105,13 @@ class ImportChangesStream implements IImportChanges {
$appointment->categories = $message->categories; $appointment->categories = $message->categories;
if (isset($message->subject)) if (isset($message->subject))
$appointment->subject = $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; $message = $appointment;
} }
......
...@@ -679,6 +679,7 @@ define("SYNC_NOTES_MESSAGECLASS", "Notes:MessageClass"); ...@@ -679,6 +679,7 @@ define("SYNC_NOTES_MESSAGECLASS", "Notes:MessageClass");
define("SYNC_NOTES_LASTMODIFIEDDATE", "Notes:LastModifiedDate"); define("SYNC_NOTES_LASTMODIFIEDDATE", "Notes:LastModifiedDate");
define("SYNC_NOTES_CATEGORIES", "Notes:Categories"); define("SYNC_NOTES_CATEGORIES", "Notes:Categories");
define("SYNC_NOTES_CATEGORY", "Notes:Category"); define("SYNC_NOTES_CATEGORY", "Notes:Category");
define("SYNC_NOTES_IGNORE_COLOR","Notes:IgnoreColor");
//RightsManagement //post 14.0 //RightsManagement //post 14.0
define("SYNC_RIGHTSMANAGEMENT_SUPPORT", "RightsManagement:RightsManagementSupport"); define("SYNC_RIGHTSMANAGEMENT_SUPPORT", "RightsManagement:RightsManagementSupport");
......
...@@ -466,15 +466,23 @@ class Sync extends RequestProcessor { ...@@ -466,15 +466,23 @@ class Sync extends RequestProcessor {
$note->categories = $message->categories; $note->categories = $message->categories;
if (isset($message->subject)) if (isset($message->subject))
$note->subject = $message->subject; $note->subject = $message->subject;
// TODO color of the note if (isset($message->location))
$note->Color = $message->location;
$message = $note; $message = $note;
// on type change, OL sends messages without a body. Ignore these updates.
if (!isset($message->asbody)) {
$message = false;
}
} }
else { else {
$message->Decode(self::$decoder); $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 if(!self::$decoder->getElementEndTag()) // end applicationdata
return false; return false;
} }
......
...@@ -52,6 +52,7 @@ class SyncNote extends SyncObject { ...@@ -52,6 +52,7 @@ class SyncNote extends SyncObject {
public $lastmodified; public $lastmodified;
public $messageclass; public $messageclass;
public $subject; public $subject;
public $Color;
function SyncNote() { function SyncNote() {
$mapping = array( $mapping = array(
...@@ -67,6 +68,8 @@ class SyncNote extends SyncObject { ...@@ -67,6 +68,8 @@ class SyncNote extends SyncObject {
SYNC_NOTES_MESSAGECLASS => array ( self::STREAMER_VAR => "messageclass"), SYNC_NOTES_MESSAGECLASS => array ( self::STREAMER_VAR => "messageclass"),
SYNC_NOTES_SUBJECT => array ( self::STREAMER_VAR => "subject"), SYNC_NOTES_SUBJECT => array ( self::STREAMER_VAR => "subject"),
SYNC_NOTES_IGNORE_COLOR => array ( self::STREAMER_VAR => "Color"),
); );
parent::SyncObject($mapping); 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