1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 07:56:12 +00:00

Fixed issues with Z-Push shared folder configuration. (#278)

start.sh generated wrong config key for folder id and wrong datatypes
for folder type and flags. This has been corrected both there and in
the automated tests.
This commit is contained in:
mithomas 2019-11-04 08:38:10 +01:00 committed by Felix Bartels
parent 73fbadab65
commit 92247340e1
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ tests:
exit-code: 0
stdout:
contains:
- " $additionalFolders = array(\n array('store' => \"SYSTEM\", 'folderrid' => \"42\", 'name' => \"Calendar\", 'type' => \"SYNC_FOLDER_TYPE_USER_APPOINTMENT\", 'flags' => \"4\"),\n array('store' => \"SYSTEM\", 'folderrid' => \"21\", 'name' => \"Mail\", 'type' => \"SYNC_FOLDER_TYPE_USER_MAIL\", 'flags' => \"0\"),\n );"
- " $additionalFolders = array(\n array('store' => \"SYSTEM\", 'folderid' => \"42\", 'name' => \"Calendar\", 'type' => SYNC_FOLDER_TYPE_USER_APPOINTMENT, 'flags' => 4),\n array('store' => \"SYSTEM\", 'folderid' => \"21\", 'name' => \"Mail\", 'type' => SYNC_FOLDER_TYPE_USER_MAIL, 'flags' => 0),\n );"
not-contains: # default entry
- "\t$additionalFolders = array("
- "\t);"

View File

@ -106,7 +106,7 @@ perl -i -0pe 's/\$additionalFolders.*\);//s' /etc/z-push/z-push.conf.php
echo -e " \$additionalFolders = array(" >> /etc/z-push/z-push.conf.php
echo "$ZPUSH_ADDITIONAL_FOLDERS" | jq -c '.[]' | while read -r folder; do
eval "$(echo "$folder" | jq -r '@sh "NAME=\(.name) ID=\(.id) TYPE=\(.type) FLAGS=\(.flags)"')"
echo -e " array('store' => \"SYSTEM\", 'folderrid' => \"$ID\", 'name' => \"$NAME\", 'type' => \"$TYPE\", 'flags' => \"$FLAGS\")," >> /etc/z-push/z-push.conf.php
echo -e " array('store' => \"SYSTEM\", 'folderid' => \"$ID\", 'name' => \"$NAME\", 'type' => $TYPE, 'flags' => $FLAGS)," >> /etc/z-push/z-push.conf.php
done
echo -e ' );' >> /etc/z-push/z-push.conf.php