"correctly store 2-char country-codes as full country name, as the UI does"

This commit is contained in:
Ralf Becker 2008-11-07 09:59:49 +00:00
parent 3fe7919b92
commit 4c6c69bebc

View File

@ -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);