From 6971292be3893aeeed51e25e6a4a269e307122a7 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 19 May 2021 09:06:06 -0600 Subject: [PATCH] Addressbook: Fix CSV import into specific addressbook was always going into importer's personal addressbook --- .../inc/class.addressbook_import_contacts_csv.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 044cf2479b..a5eb9a6b89 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -96,14 +96,14 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv { // set contact owner - $contact_owner = isset( $_definition->plugin_options['contact_owner'] ) ? - $_definition->plugin_options['contact_owner'] : $this->user; + $contact_owner = isset( $definition->plugin_options['contact_owner'] ) ? + $definition->plugin_options['contact_owner'] : $this->user; // Check to make sure target addressbook is valid if(!in_array($contact_owner, array_keys($this->bocontacts->get_addressbooks(Api\Acl::ADD)))) { $this->warnings[0] = lang("Unable to import into %1, using %2", - $contact_owner . ' ('.Api\Accounts::username($record->owner) . ')', + $contact_owner . ' ('.Api\Accounts::username($contact_owner) . ')', Api\Accounts::username($this->user) ); $contact_owner = 'personal';