changing the condition for n_fn adaption. change of given name and family name seems not to be sufficient

This commit is contained in:
Klaus Leithoff 2010-03-08 11:14:49 +00:00
parent 20aab1b6f2
commit 2595f62573

View File

@ -1223,13 +1223,13 @@ class addressbook_ui extends addressbook_bo
{ {
$links = $content['link_to']['to_id']; $links = $content['link_to']['to_id'];
} }
$fullname = $old_fullname = parent::fullname($content);
if ($content['id'] && $content['org_name'] && $content['change_org']) if ($content['id'] && $content['org_name'] && $content['change_org'])
{ {
$old_org_entry = $this->read($content['id']); $old_org_entry = $this->read($content['id']);
$old_fullname = ($old_org_entry['n_fn'] ? $old_org_entry['n_fn'] : parent::fullname($old_org_entry));
} }
if (isset($content['n_family']) && isset($content['n_given']) if ( $content['n_fn'] != $fullname || $fullname != $old_fullname)
&& $content['n_family'] != $old_org_entry['n_family']
&& $content['n_given'] != $old_org_entry['n_given'])
{ {
unset($content['n_fn']); unset($content['n_fn']);
} }