Commit b3a40500 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #500 in ZP/z-push from...

Merge pull request #500 in ZP/z-push from bugfix/ZP-1186-folder-created-under-root-in-outlook to develop

* commit '7ade800c':
  ZP-1186 Folder created under root in Outlook is not synced.
  ZP-1186 Folder created under root in Outlook is not synced.
  ZP-1186 Folder created under root in Outlook is not synced.
  ZP-1186 Folder created under root in Outlook is not synced.
parents 123a789b 7ade800c
...@@ -463,10 +463,10 @@ class DeviceManager { ...@@ -463,10 +463,10 @@ class DeviceManager {
public function GetKoeGabBackendFolderId() { public function GetKoeGabBackendFolderId() {
$gabid = false; $gabid = false;
if (KOE_CAPABILITY_GAB) { if (KOE_CAPABILITY_GAB) {
if (KOE_GAB_FOLDERID != false && KOE_GAB_FOLDERID != '') { if (KOE_GAB_FOLDERID) {
$gabid = KOE_GAB_FOLDERID; $gabid = KOE_GAB_FOLDERID;
} }
else if (KOE_GAB_STORE != "" && KOE_GAB_NAME != "") { else if (KOE_GAB_STORE && KOE_GAB_NAME) {
$gabid = $this->device->GetKoeGabBackendFolderId(); $gabid = $this->device->GetKoeGabBackendFolderId();
} }
} }
...@@ -534,7 +534,7 @@ class DeviceManager { ...@@ -534,7 +534,7 @@ class DeviceManager {
*/ */
public function GetAdditionalUserSyncFolderStore($folderid) { public function GetAdditionalUserSyncFolderStore($folderid) {
// is this the KOE GAB folder? // is this the KOE GAB folder?
if ($folderid == $this->GetKoeGabBackendFolderId()) { if ($folderid && $folderid === $this->GetKoeGabBackendFolderId()) {
return KOE_GAB_STORE; return KOE_GAB_STORE;
} }
......
...@@ -129,8 +129,8 @@ class FolderChange extends RequestProcessor { ...@@ -129,8 +129,8 @@ class FolderChange extends RequestProcessor {
// switch user store if this this happens inside an additional folder // switch user store if this this happens inside an additional folder
// if this is an additional folder the backend has to be setup correctly // if this is an additional folder the backend has to be setup correctly
if (!self::$backend->Setup(ZPush::GetAdditionalSyncFolderStore((($parentBackendId != false)?$parentBackendId:$backendid)))) if (!self::$backend->Setup(ZPush::GetAdditionalSyncFolderStore((($parentBackendId != false) ? $parentBackendId : $backendid))))
throw new StatusException(sprintf("HandleFolderChange() could not Setup() the backend for folder id '%s'", (($parentBackendId != false)?$parentBackendId:$backendid)), SYNC_FSSTATUS_SERVERERROR); throw new StatusException(sprintf("HandleFolderChange() could not Setup() the backend for folder id '%s'", (($parentBackendId != false) ? $parentBackendId : $backendid)), SYNC_FSSTATUS_SERVERERROR);
} }
catch (StateNotFoundException $snfex) { catch (StateNotFoundException $snfex) {
$status = SYNC_FSSTATUS_SYNCKEYERROR; $status = SYNC_FSSTATUS_SYNCKEYERROR;
......
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