From 9d179bb27ee5b936c9b814691eb53c6e4e4ac5d8 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 21 Mar 2011 19:51:43 +0000 Subject: [PATCH] Don't parse cat_id twice, it causes duplicate categories --- addressbook/inc/class.addressbook_import_contacts_csv.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 360b2367ff..92b097f199 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -176,7 +176,7 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi // Also handle categories in their own field $more_categories = array(); foreach($_definition->plugin_options['field_mapping'] as $number => $field_name) { - if(substr($field_name,0,3) != 'cat' || !$record[$field_name]) continue; + if(substr($field_name,0,3) != 'cat' || !$record[$field_name] || $field_name == 'cat_id') continue; list($cat, $cat_id) = explode('-', $field_name); if(is_numeric($record[$field_name]) && $record[$field_name] != 1) { // Column has a single category ID