Commit 3ccbfd83 authored by Sebastian Kummer's avatar Sebastian Kummer

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

Merge pull request #616 in ZP/z-push from bugfix/ZP-1206-statically-configured-folders-can to develop

* commit '15aec1c0':
  ZP-1206 Added flags to configured shared folders.
parents 0317b28e 15aec1c0
...@@ -343,6 +343,13 @@ ...@@ -343,6 +343,13 @@
* SYNC_FOLDER_TYPE_USER_TASK * SYNC_FOLDER_TYPE_USER_TASK
* SYNC_FOLDER_TYPE_USER_MAIL * SYNC_FOLDER_TYPE_USER_MAIL
* SYNC_FOLDER_TYPE_USER_NOTE * SYNC_FOLDER_TYPE_USER_NOTE
* flags: sets additional options on the shared folder. Supported are:
* DeviceManager::FLD_FLAGS_NONE
* No flags configured, default flag to be set
* DeviceManager::FLD_FLAGS_SENDASOWNER
* When replying in this folder, automatically do Send-As
* DeviceManager::FLD_FLAGS_CALENDARREMINDERS
* If set, Outlook shows reminders for these shares with KOE
* *
* Additional notes: * Additional notes:
* - on Kopano systems use backend/kopano/listfolders.php script to get a list * - on Kopano systems use backend/kopano/listfolders.php script to get a list
...@@ -370,6 +377,7 @@ ...@@ -370,6 +377,7 @@
'folderid' => "", 'folderid' => "",
'name' => "Public Contacts", 'name' => "Public Contacts",
'type' => SYNC_FOLDER_TYPE_USER_CONTACT, 'type' => SYNC_FOLDER_TYPE_USER_CONTACT,
'flags' => DeviceManager::FLD_FLAGS_NONE,
), ),
*/ */
); );
...@@ -43,6 +43,7 @@ class DeviceManager { ...@@ -43,6 +43,7 @@ class DeviceManager {
const FLD_ORIGIN_SHARED = "S"; const FLD_ORIGIN_SHARED = "S";
const FLD_ORIGIN_GAB = "G"; const FLD_ORIGIN_GAB = "G";
const FLD_FLAGS_NONE = 0;
const FLD_FLAGS_SENDASOWNER = 1; const FLD_FLAGS_SENDASOWNER = 1;
const FLD_FLAGS_TRACKSHARENAME = 2; const FLD_FLAGS_TRACKSHARENAME = 2;
const FLD_FLAGS_CALENDARREMINDERS = 4; const FLD_FLAGS_CALENDARREMINDERS = 4;
......
...@@ -694,7 +694,13 @@ class ZPush { ...@@ -694,7 +694,13 @@ class ZPush {
continue; continue;
} }
$folder = self::GetDeviceManager()->BuildSyncFolderObject($af['store'], $af['folderid'], '0', $af['name'], $af['type'], 0, DeviceManager::FLD_ORIGIN_CONFIG); // don't fail hard if no flags are set, but we at least warn about it
if (!isset($af['flags'])) {
ZLog::Write(LOGLEVEL_WARN, sprintf("ZPush::getAddSyncFolders() : the additional folder '%s' is not configured completely. Missing 'flags' parameter, defaulting to DeviceManager::FLD_FLAGS_NONE.", $af['name']));
$af['flags'] = DeviceManager::FLD_FLAGS_NONE;
}
$folder = self::GetDeviceManager()->BuildSyncFolderObject($af['store'], $af['folderid'], '0', $af['name'], $af['type'], $af['flags'], DeviceManager::FLD_ORIGIN_CONFIG);
self::$addSyncFolders[$folder->BackendId] = $folder; self::$addSyncFolders[$folder->BackendId] = $folder;
} }
} }
......
...@@ -526,7 +526,7 @@ class ZPushAdmin { ...@@ -526,7 +526,7 @@ class ZPushAdmin {
'name' => $so->displayname, 'name' => $so->displayname,
'type' => $so->type, 'type' => $so->type,
'origin' => ($syncfolderid !== $fid)?Utils::GetFolderOriginStringFromId($syncfolderid):'unknown', 'origin' => ($syncfolderid !== $fid)?Utils::GetFolderOriginStringFromId($syncfolderid):'unknown',
'flags' => 0, // static folders have no flags 'flags' => $so->Flags,
); );
} }
} }
......
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