Commit 4c8fbb8d authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-907 Added config variable (not yet in config!) which disables the

secondary contacts folder by default.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 0c293af4
...@@ -347,7 +347,7 @@ class ChangesMemoryWrapper extends HierarchyCache implements IImportChanges, IEx ...@@ -347,7 +347,7 @@ class ChangesMemoryWrapper extends HierarchyCache implements IImportChanges, IEx
// ZP-907: if we are ADDING a secondary contact folder and Outlook is connected, rewrite the type to SYNC_FOLDER_TYPE_UNKNOWN and mark the foldername // ZP-907: if we are ADDING a secondary contact folder and Outlook is connected, rewrite the type to SYNC_FOLDER_TYPE_UNKNOWN and mark the foldername
// TODO: ZP-1124 this should only be done, if the feature is enabled and the KOE version supports this feature // TODO: ZP-1124 this should only be done, if the feature is enabled and the KOE version supports this feature
if ($change[1]->type == SYNC_FOLDER_TYPE_USER_CONTACT && ZPush::GetDeviceManager()->IsKoe()) { if (defined('KOE_CAPABILITY_SECONDARYCONTACTS') && KOE_CAPABILITY_SECONDARYCONTACTS && $change[1]->type == SYNC_FOLDER_TYPE_USER_CONTACT && ZPush::GetDeviceManager()->IsKoe()) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ChangesMemoryWrapper->Synchronize(): Synchronizing folder '%s' as type SYNC_FOLDER_TYPE_UNKNOWN as Outlook is not able to handle secondary contact folders", $change[1]->displayname)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("ChangesMemoryWrapper->Synchronize(): Synchronizing folder '%s' as type SYNC_FOLDER_TYPE_UNKNOWN as Outlook is not able to handle secondary contact folders", $change[1]->displayname));
$change[1] = Utils::ChangeFolderToTypeUnknownForKoe($change[1]); $change[1] = Utils::ChangeFolderToTypeUnknownForKoe($change[1]);
} }
......
...@@ -491,7 +491,7 @@ class DeviceManager { ...@@ -491,7 +491,7 @@ class DeviceManager {
// adjust additional folders so it matches not yet processed KOE type UNKNOWN folders // adjust additional folders so it matches not yet processed KOE type UNKNOWN folders
$type = $this->device->GetFolderType($folder->serverid); $type = $this->device->GetFolderType($folder->serverid);
if ($type !== $folder->type && $type == SYNC_FOLDER_TYPE_UNKNOWN) { if (defined('KOE_CAPABILITY_SECONDARYCONTACTS') && KOE_CAPABILITY_SECONDARYCONTACTS && $type !== $folder->type && $type == SYNC_FOLDER_TYPE_UNKNOWN) {
ZLog::Write(LOGLEVEL_DEBUG, "DeviceManager->GetAdditionalUserSyncFolders(): Modifying additional folder so it matches an unprocessed KOE folder"); ZLog::Write(LOGLEVEL_DEBUG, "DeviceManager->GetAdditionalUserSyncFolders(): Modifying additional folder so it matches an unprocessed KOE folder");
$folder = Utils::ChangeFolderToTypeUnknownForKoe($folder); $folder = Utils::ChangeFolderToTypeUnknownForKoe($folder);
} }
......
...@@ -49,6 +49,7 @@ class Settings extends RequestProcessor { ...@@ -49,6 +49,7 @@ class Settings extends RequestProcessor {
if (defined('KOE_CAPABILITY_NOTES') && KOE_CAPABILITY_NOTES) $cap[] = "notes"; if (defined('KOE_CAPABILITY_NOTES') && KOE_CAPABILITY_NOTES) $cap[] = "notes";
if (defined('KOE_CAPABILITY_SHAREDFOLDER') && KOE_CAPABILITY_SHAREDFOLDER) $cap[] = "sharedfolder"; if (defined('KOE_CAPABILITY_SHAREDFOLDER') && KOE_CAPABILITY_SHAREDFOLDER) $cap[] = "sharedfolder";
if (defined('KOE_CAPABILITY_SENDAS') && KOE_CAPABILITY_SENDAS) $cap[] = "sendas"; if (defined('KOE_CAPABILITY_SENDAS') && KOE_CAPABILITY_SENDAS) $cap[] = "sendas";
if (defined('KOE_CAPABILITY_SECONDARYCONTACTS') && KOE_CAPABILITY_SECONDARYCONTACTS) $cap[] = "secondarycontacts";
self::$specialHeaders = array(); self::$specialHeaders = array();
self::$specialHeaders[] = "X-Push-Capabilities: ". implode(",",$cap); self::$specialHeaders[] = "X-Push-Capabilities: ". implode(",",$cap);
......
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