Fix n_fn update issue

This commit is contained in:
Jörg Lehrke 2010-03-05 08:28:25 +00:00
parent 3eb38935bb
commit d397dcded2

View File

@ -1088,7 +1088,7 @@ class addressbook_ui extends addressbook_bo
// hide region for address format 'postcode_city'
if (($row['addr_format'] = $this->addr_format_by_country($row['adr_one_countryname']))=='postcode_city') unset($row['adr_one_region']);
if (($row['addr_format2'] = $this->addr_format_by_country($row['adr_two_countryname']))=='postcode_city') unset($row['adr_two_region']);
// respect category permissions
if(!empty($row['cat_id']))
{
@ -1227,6 +1227,12 @@ class addressbook_ui extends addressbook_bo
{
$old_org_entry = $this->read($content['id']);
}
if (isset($content['n_family']) && isset($content['n_given'])
&& $content['n_family'] != $old_org_entry['n_family']
&& $content['n_given'] != $old_org_entry['n_given'])
{
unset($content['n_fn']);
}
if ($this->save($content))
{
$content['msg'] = lang('Contact saved');
@ -1627,7 +1633,7 @@ class addressbook_ui extends addressbook_bo
$content[$key.'2'] = $content[$key];
}
}
// respect category permissions
if(!empty($content['cat_id']))
{
@ -2038,7 +2044,7 @@ class addressbook_ui extends addressbook_bo
}
common::egw_footer();
}
/**
* Cleanup all contacts of all users (called by Admin >> Addressbook >> Site configuration (Admin only)
*