* Addressbook: Fix avatar photo gets removed when adding category to contact via contextmenu

This commit is contained in:
Hadi Nategh 2018-01-31 16:10:48 +01:00
parent 8f5734252c
commit 189de3ddda

View File

@ -864,6 +864,10 @@ class Contacts extends Contacts\Storage
*/
function save(&$contact, $ignore_acl=false, $touch_modified=true)
{
// Make sure photo remains unchanged unless its purposely set to be false
// which means photo has changed.
if (!array_key_exists('photo_unchanged',$contact)) $contact['photo_unchanged'] = true;
// remember if we add or update a entry
if (($isUpdate = $contact['id']))
{