Commit c74d567b authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #21 in ZO/z-push from...

Merge pull request #21 in ZO/z-push from bugfix/ZO-118-z-push-may-never-send-notes-if-koe to develop

* commit 'ea9ec151':
  ZO-118 The note color should not be streamed, don't sync notes if notes support is disabled or the plugin is not installed.
parents 025fa6f7 ea9ec151
...@@ -89,32 +89,38 @@ class ImportChangesStream implements IImportChanges { ...@@ -89,32 +89,38 @@ class ImportChangesStream implements IImportChanges {
} }
// KOE ZO-42: to sync Notes to Outlook we sync them as Appointments // KOE ZO-42: to sync Notes to Outlook we sync them as Appointments
if (KOE_CAPABILITY_NOTES && $this->classAsString == "SyncNote" && ZPush::GetDeviceManager()->IsOutlookClient()) { if ($this->classAsString == "SyncNote") {
// update category from SyncNote->Color if (KOE_CAPABILITY_NOTES && ZPush::GetDeviceManager()->IsOutlookClient()) {
$message->SetCategoryFromColor(); // update category from SyncNote->Color
$message->SetCategoryFromColor();
$appointment = new SyncAppointment();
$appointment->busystatus = 0; $appointment = new SyncAppointment();
$appointment->sensitivity = 0; $appointment->busystatus = 0;
$appointment->alldayevent = 0; $appointment->sensitivity = 0;
$appointment->reminder = 0; $appointment->alldayevent = 0;
$appointment->meetingstatus = 0; $appointment->reminder = 0;
$appointment->responserequested = 0; $appointment->meetingstatus = 0;
$appointment->responserequested = 0;
$appointment->flags = $message->flags;
if (isset($message->asbody)) $appointment->flags = $message->flags;
$appointment->asbody = $message->asbody; if (isset($message->asbody))
if (isset($message->categories)) $appointment->asbody = $message->asbody;
$appointment->categories = $message->categories; if (isset($message->categories))
if (isset($message->subject)) $appointment->categories = $message->categories;
$appointment->subject = $message->subject; if (isset($message->subject))
if (isset($message->lastmodified)) $appointment->subject = $message->subject;
$appointment->dtstamp = $message->lastmodified; if (isset($message->lastmodified))
$appointment->dtstamp = $message->lastmodified;
$appointment->starttime = time();
$appointment->endtime = $appointment->starttime + 1; $appointment->starttime = time();
$appointment->endtime = $appointment->starttime + 1;
$message = $appointment;
$message = $appointment;
}
else if (Request::GetDeviceType() == "WindowsOutlook") {
ZLog::Write(LOGLEVEL_WARN, "MS Outlook is synchronizing Notes folder without active KOE settings or extension. Not streaming SyncNote change!");
return false;
}
} }
// prevent sending the same object twice in one request // prevent sending the same object twice in one request
......
...@@ -84,7 +84,8 @@ class SyncNote extends SyncObject { ...@@ -84,7 +84,8 @@ class SyncNote extends SyncObject {
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"), SYNC_NOTES_IGNORE_COLOR => array ( self::STREAMER_VAR => "Color",
self::STREAMER_TYPE => self::STREAMER_TYPE_IGNORE),
); );
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