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
2ebd7424
Commit
2ebd7424
authored
Jan 28, 2016
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/ZP-818-send-no-answer-collection-for-unchanged
parents
2e3a3a58
989e8537
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
8 deletions
+25
-8
autodiscover.php
src/autodiscover/autodiscover.php
+8
-4
mapimapping.php
src/backend/zarafa/mapimapping.php
+1
-0
mapiprovider.php
src/backend/zarafa/mapiprovider.php
+2
-0
ping.php
src/lib/request/ping.php
+14
-4
No files found.
src/autodiscover/autodiscover.php
View file @
2ebd7424
...
...
@@ -45,7 +45,8 @@ require_once '../vendor/autoload.php';
require_once
'../config.php'
;
class
ZPushAutodiscover
{
const
ACCEPTABLERESPONSESCHEMA
=
'http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006'
;
const
ACCEPTABLERESPONSESCHEMAMOBILESYNC
=
'http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006'
;
const
ACCEPTABLERESPONSESCHEMAOUTLOOK
=
'http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a'
;
const
MAXINPUTSIZE
=
8192
;
// Bytes, the autodiscover request shouldn't exceed that value
private
static
$instance
;
...
...
@@ -98,9 +99,12 @@ class ZPushAutodiscover {
$email
=
(
$this
->
getAttribFromUserDetails
(
$userDetails
,
'emailaddress'
))
?
$this
->
getAttribFromUserDetails
(
$userDetails
,
'emailaddress'
)
:
$incomingXml
->
Request
->
EMailAddress
;
$userFullname
=
(
$this
->
getAttribFromUserDetails
(
$userDetails
,
'fullname'
))
?
$this
->
getAttribFromUserDetails
(
$userDetails
,
'fullname'
)
:
$email
;
ZLog
::
Write
(
LOGLEVEL_WBXML
,
sprintf
(
"Resolved user's '%s' fullname to '%s'"
,
$username
,
$userFullname
));
// At the moment Z-Push only supports mobile response schema for autodiscover. Send empty response if the client request outlook response schema.
if
(
$incomingXml
->
Request
->
AcceptableResponseSchema
==
ZPushAutodiscover
::
ACCEPTABLERESPONSESCHEMAMOBILESYNC
)
{
$response
=
$this
->
createResponse
(
$email
,
$userFullname
);
setcookie
(
"membername"
,
$username
);
}
}
catch
(
AuthenticationRequiredException
$ex
)
{
if
(
isset
(
$incomingXml
))
{
...
...
@@ -162,7 +166,7 @@ class ZPushAutodiscover {
throw
new
FatalException
(
'Invalid input XML: no AcceptableResponseSchema.'
);
}
if
(
$xml
->
Request
->
AcceptableResponseSchema
!=
ZPushAutodiscover
::
ACCEPTABLERESPONSESCHEMA
)
{
if
(
$xml
->
Request
->
AcceptableResponseSchema
!=
ZPushAutodiscover
::
ACCEPTABLERESPONSESCHEMA
MOBILESYNC
&&
$xml
->
Request
->
AcceptableResponseSchema
!=
ZPushAutodiscover
::
ACCEPTABLERESPONSESCHEMAOUTLOOK
)
{
throw
new
FatalException
(
'Invalid input XML: not a mobilesync responseschema.'
);
}
...
...
src/backend/zarafa/mapimapping.php
View file @
2ebd7424
...
...
@@ -401,6 +401,7 @@ class MAPIMapping {
"status"
=>
"PT_LONG:PSETID_Task:0x8101"
,
"icon"
=>
PR_ICON_INDEX
,
"owner"
=>
"PT_STRING8:PSETID_Task:0x811F"
,
"private"
=>
"PT_BOOLEAN:PSETID_Common:0x8506"
,
);
}
...
...
src/backend/zarafa/mapiprovider.php
View file @
2ebd7424
...
...
@@ -1589,6 +1589,8 @@ class MAPIProvider {
$recurrence
->
setRecurrence
(
$recur
);
}
$props
[
$taskprops
[
"private"
]]
=
(
isset
(
$task
->
sensitivity
)
&&
$task
->
sensitivity
==
SENSITIVITY_PRIVATE
)
?
true
:
false
;
//open addresss book for user resolve to set the owner
$addrbook
=
$this
->
getAddressbook
();
...
...
src/lib/request/ping.php
View file @
2ebd7424
...
...
@@ -103,9 +103,8 @@ class Ping extends RequestProcessor {
}
if
((
$el
=
self
::
$decoder
->
getElementStartTag
(
SYNC_PING_FOLDERS
))
&&
$el
[
EN_FLAGS
]
&
EN_FLAGS_CONTENT
)
{
// remove PingableFlag from all collections
foreach
(
$sc
as
$folderid
=>
$spa
)
$spa
->
DelPingableFlag
();
// cache requested (pingable) folderids
$pingable
=
array
();
while
(
self
::
$decoder
->
getElementStartTag
(
SYNC_PING_FOLDER
))
{
WBXMLDecoder
::
ResetInWhile
(
"pingFolder"
);
...
...
@@ -143,13 +142,24 @@ class Ping extends RequestProcessor {
$foundchanges
=
true
;
}
else
if
(
$class
==
$spa
->
GetContentClass
())
{
$
spa
->
SetPingableFlag
(
true
)
;
$
pingable
[]
=
$folderid
;
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
sprintf
(
"HandlePing(): using saved sync state for '%s' id '%s'"
,
$spa
->
GetContentClass
(),
$folderid
));
}
}
if
(
!
self
::
$decoder
->
getElementEndTag
())
return
false
;
// update pingable flags
foreach
(
$sc
as
$folderid
=>
$spa
)
{
// if the folderid is in $pingable, we should ping it, else remove the flag
if
(
in_array
(
$folderid
,
$pingable
))
{
$spa
->
SetPingableFlag
(
true
);
}
else
{
$spa
->
DelPingableFlag
();
}
}
}
if
(
!
self
::
$decoder
->
getElementEndTag
())
return
false
;
...
...
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