From 7d14918e49e969d77d99256ef4e43f895580fdb5 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 22 Nov 2018 09:55:27 -0700 Subject: [PATCH] * Addressbook - fix photos not imported via Import / Export --- .../inc/class.addressbook_import_contacts_csv.inc.php | 7 +++++++ addressbook/inc/class.addressbook_import_vcard.inc.php | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 88d4d595de..4bb2db32c3 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -286,6 +286,13 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv { */ protected function action ( $_action, importexport_iface_egw_record &$record, $record_num = 0 ) { $_data = $record->get_record_array(); + + // Make sure picture is loaded/updated + if($_data['jpegphoto']) + { + $_data['photo_unchanged'] = false; + } + switch ($_action) { case 'none' : return true; diff --git a/addressbook/inc/class.addressbook_import_vcard.inc.php b/addressbook/inc/class.addressbook_import_vcard.inc.php index 6b4c3e8d5a..2b94d6f9c1 100644 --- a/addressbook/inc/class.addressbook_import_vcard.inc.php +++ b/addressbook/inc/class.addressbook_import_vcard.inc.php @@ -184,6 +184,11 @@ class addressbook_import_vcard implements importexport_iface_import_plugin { { $record['cat_id'] = implode(',',$this->bocontacts->find_or_add_categories($record['cat_id'], -1)); } + // Make sure picture is loaded/updated + if($record['jpegphoto']) + { + $record['photo_unchanged'] = false; + } return $record; }