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
a0773223
Commit
a0773223
authored
Feb 26, 2016
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZO-42 First prototype.
(cherry picked from commit
9f395cf9
)
parent
a635643c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
streamimporter.php
src/lib/core/streamimporter.php
+8
-1
sync.php
src/lib/request/sync.php
+20
-1
No files found.
src/lib/core/streamimporter.php
View file @
a0773223
...
@@ -84,8 +84,9 @@ class ImportChangesStream implements IImportChanges {
...
@@ -84,8 +84,9 @@ class ImportChangesStream implements IImportChanges {
*/
*/
public
function
ImportMessageChange
(
$id
,
$message
)
{
public
function
ImportMessageChange
(
$id
,
$message
)
{
// ignore other SyncObjects
// ignore other SyncObjects
if
(
!
(
$message
instanceof
$this
->
classAsString
)
)
if
(
!
(
$message
instanceof
$this
->
classAsString
)
&&
!
(
$this
->
classAsString
==
"SyncNote"
&&
Request
::
GetDeviceType
()
==
"WindowsOutlook"
))
{
return
false
;
return
false
;
}
// prevent sending the same object twice in one request
// prevent sending the same object twice in one request
if
(
in_array
(
$id
,
$this
->
seenObjects
))
{
if
(
in_array
(
$id
,
$this
->
seenObjects
))
{
...
@@ -242,6 +243,12 @@ class ImportChangesStream implements IImportChanges {
...
@@ -242,6 +243,12 @@ class ImportChangesStream implements IImportChanges {
else
else
$this
->
encoder
->
startTag
(
SYNC_FOLDERHIERARCHY_UPDATE
);
$this
->
encoder
->
startTag
(
SYNC_FOLDERHIERARCHY_UPDATE
);
// TODO this is part of synchronizing additional Contact folder to OL
if
(
$folder
->
type
==
SYNC_FOLDER_TYPE_USER_CONTACT
&&
Request
::
GetDeviceType
()
==
"WindowsOutlook"
)
{
$folder
->
type
=
SYNC_FOLDER_TYPE_USER_APPOINTMENT
;
}
$folder
->
Encode
(
$this
->
encoder
);
$folder
->
Encode
(
$this
->
encoder
);
$this
->
encoder
->
endTag
();
$this
->
encoder
->
endTag
();
...
...
src/lib/request/sync.php
View file @
a0773223
...
@@ -446,9 +446,28 @@ class Sync extends RequestProcessor {
...
@@ -446,9 +446,28 @@ class Sync extends RequestProcessor {
// Get the SyncMessage if sent
// Get the SyncMessage if sent
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
());
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
"--------------ContentClass:"
.
$spa
->
GetContentClass
()
.
" foldertype:"
.
$foldertype
);
$message
=
ZPush
::
getSyncObjectFromFolderClass
((
$foldertype
)
?
$foldertype
:
$spa
->
GetContentClass
());
// Acacia sends notes as Tasks
if
(
$spa
->
GetContentClass
()
==
"Notes"
&&
Request
::
GetDeviceType
()
==
"WindowsOutlook"
)
{
$message
=
new
SyncTask
();
}
$message
->
Decode
(
self
::
$decoder
);
$message
->
Decode
(
self
::
$decoder
);
// Acacia: transform the SyncTask into a SyncNote
if
(
$spa
->
GetContentClass
()
==
"Notes"
&&
Request
::
GetDeviceType
()
==
"WindowsOutlook"
)
{
$note
=
new
SyncNote
();
if
(
isset
(
$message
->
asbody
))
$note
->
asbody
=
$message
->
asbody
;
if
(
isset
(
$message
->
categories
))
$note
->
categories
=
$message
->
categories
;
$note
->
subject
=
$message
->
subject
;
// TODO color of the note
$message
=
$note
;
}
// set Ghosted fields
// set Ghosted fields
$message
->
emptySupported
(
self
::
$deviceManager
->
GetSupportedFields
(
$spa
->
GetFolderId
()));
$message
->
emptySupported
(
self
::
$deviceManager
->
GetSupportedFields
(
$spa
->
GetFolderId
()));
if
(
!
self
::
$decoder
->
getElementEndTag
())
// end applicationdata
if
(
!
self
::
$decoder
->
getElementEndTag
())
// end applicationdata
...
...
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