diff --git a/addressbook/inc/class.addressbook_import_vcard.inc.php b/addressbook/inc/class.addressbook_import_vcard.inc.php index 01cb282239..6b4c3e8d5a 100644 --- a/addressbook/inc/class.addressbook_import_vcard.inc.php +++ b/addressbook/inc/class.addressbook_import_vcard.inc.php @@ -163,12 +163,6 @@ class addressbook_import_vcard implements importexport_iface_import_plugin { $record['owner'] = $owner; - // If photo is set, we want to update it - if($record['jpegphoto']) - { - $record['photo_unchanged'] = false; - } - // Check that owner (addressbook) is allowed if(!array_key_exists($record['owner'], $this->bocontacts->get_addressbooks())) { diff --git a/addressbook/inc/class.addressbook_vcal.inc.php b/addressbook/inc/class.addressbook_vcal.inc.php index 333c6207c8..5f1f7d7e78 100644 --- a/addressbook/inc/class.addressbook_vcal.inc.php +++ b/addressbook/inc/class.addressbook_vcal.inc.php @@ -145,6 +145,7 @@ class addressbook_vcal extends addressbook_bo { if (($old_contact = $this->read($_abID))) { + $contact['photo_unchanged'] = $old_contact['jpegphoto'] === $contact['jpegphoto']; if ($merge) { foreach (array_keys($contact) as $key) @@ -177,6 +178,8 @@ class addressbook_vcal extends addressbook_bo } else { + // If photo is set, we want to update it + $contact['photo_unchanged'] = false; if (is_array($contact['cat_id'])) { $contact['cat_id'] = implode(',',$this->find_or_add_categories($contact['cat_id'], -1));