Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Björn Fischer
z-push
Commits
ea9ec151
Commit
ea9ec151
authored
May 15, 2016
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZO-118 The note color should not be streamed, don't sync notes if notes
support is disabled or the plugin is not installed.
parent
025fa6f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
27 deletions
+34
-27
streamimporter.php
src/lib/core/streamimporter.php
+32
-26
syncnote.php
src/lib/syncobjects/syncnote.php
+2
-1
No files found.
src/lib/core/streamimporter.php
View file @
ea9ec151
...
...
@@ -89,32 +89,38 @@ class ImportChangesStream implements IImportChanges {
}
// KOE ZO-42: to sync Notes to Outlook we sync them as Appointments
if
(
KOE_CAPABILITY_NOTES
&&
$this
->
classAsString
==
"SyncNote"
&&
ZPush
::
GetDeviceManager
()
->
IsOutlookClient
())
{
// update category from SyncNote->Color
$message
->
SetCategoryFromColor
();
$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
;
if
(
isset
(
$message
->
categories
))
$appointment
->
categories
=
$message
->
categories
;
if
(
isset
(
$message
->
subject
))
$appointment
->
subject
=
$message
->
subject
;
if
(
isset
(
$message
->
lastmodified
))
$appointment
->
dtstamp
=
$message
->
lastmodified
;
$appointment
->
starttime
=
time
();
$appointment
->
endtime
=
$appointment
->
starttime
+
1
;
$message
=
$appointment
;
if
(
$this
->
classAsString
==
"SyncNote"
)
{
if
(
KOE_CAPABILITY_NOTES
&&
ZPush
::
GetDeviceManager
()
->
IsOutlookClient
())
{
// update category from SyncNote->Color
$message
->
SetCategoryFromColor
();
$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
;
if
(
isset
(
$message
->
categories
))
$appointment
->
categories
=
$message
->
categories
;
if
(
isset
(
$message
->
subject
))
$appointment
->
subject
=
$message
->
subject
;
if
(
isset
(
$message
->
lastmodified
))
$appointment
->
dtstamp
=
$message
->
lastmodified
;
$appointment
->
starttime
=
time
();
$appointment
->
endtime
=
$appointment
->
starttime
+
1
;
$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
...
...
src/lib/syncobjects/syncnote.php
View file @
ea9ec151
...
...
@@ -84,7 +84,8 @@ class SyncNote extends SyncObject {
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment