From 8c094fd6bece9c24ea7136b568f31e4e117c07f3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 15 Mar 2011 00:02:54 +0000 Subject: [PATCH] Automatically translate owner field from name to id (happens after set translation on field) --- addressbook/inc/class.addressbook_import_contacts_csv.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 6de81c9008..057a9e370a 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -150,6 +150,9 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi // don't import empty contacts if( count( array_unique( $record ) ) < 2 ) continue; + // Automatically handle text owner without explicit translation + $record['owner'] = importexport_helper_functions::account_name2id($record['owner']); + // Set owner, unless it's supposed to come from CSV file if($_definition->plugin_options['owner_from_csv']) { if(!is_numeric($record['owner'])) {