Commit 704e0c93 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge branch 'develop' of https://stash.z-hub.io/scm/zp/z-push into...

Merge branch 'develop' of https://stash.z-hub.io/scm/zp/z-push into feature/ZP-1122-sync-loop-failsafe-check-for-out-of-memory
parents 98dcc72c eefbcf6d
......@@ -594,17 +594,8 @@ class MAPIProvider {
$props = $this->getProps($mapimessage, $meetingrequestproperties);
// Get the GOID
if(isset($props[$meetingrequestproperties["goidtag"]])) {
$req = new Meetingrequest($this->store, $mapimessage, $this->session);
$items = $req->findCalendarItems($props[$meetingrequestproperties["goidtag"]]);
// GlobalObjId support was removed in AS 16.0
if (Request::IsGlobalObjIdHexClient() && !empty($items)) {
$message->meetingrequest->globalobjid = strtoupper(bin2hex($props[$meetingrequestproperties["goidtag"]]));
}
else {
$message->meetingrequest->globalobjid = base64_encode($props[$meetingrequestproperties["goidtag"]]);
}
}
if(isset($props[$meetingrequestproperties["goidtag"]]))
$message->meetingrequest->globalobjid = base64_encode($props[$meetingrequestproperties["goidtag"]]);
// Set Timezone
if(isset($props[$meetingrequestproperties["timezonetag"]]))
......
......@@ -497,7 +497,10 @@ class FileStateMachine implements IStateMachine {
* @access public
* @return array
*/
protected function getStateFiles($pattern = STATE_DIR.'*/*/*') {
protected function getStateFiles($pattern = null) {
if ($pattern === null) {
$pattern = STATE_DIR.'*/*/*';
}
if (empty($this->statefiles) || $pattern != $this->pattern) {
$this->statefiles = glob($pattern, GLOB_NOSORT);
$this->pattern = $pattern;
......
......@@ -651,30 +651,6 @@ class Request {
return memory_get_peak_usage(true) >= self::$memoryLimit;
}
/**
* Checks the device type if it expects the globalobjid in meeting requests encoded as hex.
* If it's not the case, globalobjid will be base64 encoded.
*
* iOS device since 9.3 (?) version expect globalobjid to be hex encoded.
* @see https://jira.z-hub.io/projects/ZP/issues/ZP-1013
*
* @access public
* @return boolean
*/
static public function IsGlobalObjIdHexClient() {
switch (self::GetDeviceType()) {
case "iPod":
case "iPad":
case "iPhone":
$matches = array();
if (preg_match("/^Apple-.*?\/(\d{4})\./", self::GetUserAgent(), $matches) && isset($matches[1]) && $matches[1] >= 1305) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Request->IsGlobalObjIdHexClient(): %s->%s", self::GetDeviceType(), self::GetUserAgent()));
return true;
}
}
return false;
}
/**----------------------------------------------------------------------------------------------------------
* Private stuff
*/
......
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