diff options
Diffstat (limited to 'apps/dav/lib/CardDAV/Converter.php')
-rw-r--r-- | apps/dav/lib/CardDAV/Converter.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index 0f8ea799f1e..eb43fe7d671 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -61,9 +61,15 @@ class Converter { $publish = false; foreach ($userData as $property => $value) { - if ($value['scope'] === AccountManager::VISIBILITY_CONTACTS_ONLY || - $value['scope'] === AccountManager::VISIBILITY_PUBLIC - ) { + + $shareWithTrustedServers = + $value['scope'] === AccountManager::VISIBILITY_CONTACTS_ONLY || + $value['scope'] === AccountManager::VISIBILITY_PUBLIC; + + $emptyValue = !isset($value['value']) || $value['value'] === ''; + $noImage = $image === null; + + if ($shareWithTrustedServers && (!$emptyValue || !$noImage)) { $publish = true; switch ($property) { case AccountManager::PROPERTY_DISPLAYNAME: |