Commit b9daba6b authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1146 Allow SYNC_FOLDER_TYPE_OTHER to be opened via shared folder API.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 5d3ae176
...@@ -855,7 +855,7 @@ class ASDevice extends StateObject { ...@@ -855,7 +855,7 @@ class ASDevice extends StateObject {
} }
// check if type is of a additional user type // check if type is of a additional user type
if (!in_array($type, array(SYNC_FOLDER_TYPE_USER_CONTACT, SYNC_FOLDER_TYPE_USER_APPOINTMENT, SYNC_FOLDER_TYPE_USER_TASK, SYNC_FOLDER_TYPE_USER_MAIL, SYNC_FOLDER_TYPE_USER_NOTE, SYNC_FOLDER_TYPE_USER_JOURNAL))) { if (!in_array($type, array(SYNC_FOLDER_TYPE_OTHER, SYNC_FOLDER_TYPE_USER_CONTACT, SYNC_FOLDER_TYPE_USER_APPOINTMENT, SYNC_FOLDER_TYPE_USER_TASK, SYNC_FOLDER_TYPE_USER_MAIL, SYNC_FOLDER_TYPE_USER_NOTE, SYNC_FOLDER_TYPE_USER_JOURNAL))) {
ZLog::Write(LOGLEVEL_ERROR, sprintf("ASDevice->AddAdditionalFolder(): folder can not be added because the specified type '%s' is not a permitted user type.", $type)); ZLog::Write(LOGLEVEL_ERROR, sprintf("ASDevice->AddAdditionalFolder(): folder can not be added because the specified type '%s' is not a permitted user type.", $type));
return false; return false;
} }
...@@ -1039,7 +1039,7 @@ class ASDevice extends StateObject { ...@@ -1039,7 +1039,7 @@ class ASDevice extends StateObject {
// transform our array in a key/value array where folderids are keys and do some basic checks // transform our array in a key/value array where folderids are keys and do some basic checks
$toOrder = array(); $toOrder = array();
$ordered = array(); $ordered = array();
$validTypes = array(SYNC_FOLDER_TYPE_USER_CONTACT, SYNC_FOLDER_TYPE_USER_APPOINTMENT, SYNC_FOLDER_TYPE_USER_TASK, SYNC_FOLDER_TYPE_USER_MAIL, SYNC_FOLDER_TYPE_USER_NOTE, SYNC_FOLDER_TYPE_USER_JOURNAL); $validTypes = array(SYNC_FOLDER_TYPE_OTHER, SYNC_FOLDER_TYPE_USER_CONTACT, SYNC_FOLDER_TYPE_USER_APPOINTMENT, SYNC_FOLDER_TYPE_USER_TASK, SYNC_FOLDER_TYPE_USER_MAIL, SYNC_FOLDER_TYPE_USER_NOTE, SYNC_FOLDER_TYPE_USER_JOURNAL);
foreach($folders as $f) { foreach($folders as $f) {
// fail early // fail early
if (!$f['folderid'] || !$f['name']) { if (!$f['folderid'] || !$f['name']) {
......
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