From 4c6c69bebc306b767300829a470bb23831ee1789 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 7 Nov 2008 09:59:49 +0000 Subject: [PATCH] "correctly store 2-char country-codes as full country name, as the UI does" --- addressbook/csv_import.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addressbook/csv_import.php b/addressbook/csv_import.php index ce38047db2..f3f237406d 100644 --- a/addressbook/csv_import.php +++ b/addressbook/csv_import.php @@ -403,6 +403,13 @@ switch($_POST['action']) { $values['private'] = (int) in_array($values['private'],array(lang('yes'),'yes','private','1','true')); } + foreach(array('adr_one_countryname','adr_two_countryname') as $name) + { + if (strlen($values[$name]) == 2) + { + $values[$name] = $GLOBALS['egw']->country->get_full_name($values[$name]); + } + } if(!$_POST['debug'] && !$empty) // dont import empty contacts { $rvalue=$GLOBALS['egw']->contacts->save($values);