Commit 156fb7c9 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1186 Folder created under root in Outlook is not synced.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 81890239
...@@ -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,11 +129,8 @@ class FolderChange extends RequestProcessor { ...@@ -129,11 +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);
// reset to default store in backend
self::$backend->Setup(false);
} }
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