mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
fix: address2, address3 and ophone where not saved :-(
This commit is contained in:
parent
aef673da05
commit
488df1c485
@ -143,10 +143,10 @@ class bocontacts extends socontacts
|
||||
($contact['n_family'] ? ' '.$contact['n_family'] : '').
|
||||
($contact['n_suffix'] ? ' '.$contact['n_suffix'] : '');
|
||||
// for some bad historical reasons we mainfileds saved in cf :-(((
|
||||
$data['#ophone'] = $data['ophone']; unset($data['ophone']);
|
||||
$data['#address2'] = $data['address2']; unset($data['address2']);
|
||||
$data['#address3'] = $data['address3']; unset($data['address3']);
|
||||
|
||||
$contact['#ophone'] = $contact['ophone']; unset($contact['ophone']);
|
||||
$contact['#address2'] = $contact['address2']; unset($contact['address2']);
|
||||
$contact['#address3'] = $contact['address3']; unset($contact['address3']);
|
||||
|
||||
$error_nr = parent::save($contact);
|
||||
|
||||
if(!$error_nr)
|
||||
@ -159,9 +159,10 @@ class bocontacts extends socontacts
|
||||
}
|
||||
|
||||
// for some bad historical reasons we mainfileds saved in cf :-(((
|
||||
$data['ophone'] = $data['#ophone']; unset($data['#ophone']);
|
||||
$data['address2'] = $data['#address2']; unset($data['#address2']);
|
||||
$data['address3'] = $data['#address3']; unset($data['#address3']);
|
||||
$contact['ophone'] = $contact['#ophone']; unset($contact['#ophone']);
|
||||
$contact['address2'] = $contact['#address2']; unset($contact['#address2']);
|
||||
$contact['address3'] = $contact['#address3']; unset($contact['#address3']);
|
||||
|
||||
$contact['msg'] = $error_nr ?
|
||||
lang('Something went wrong by saving this contact. Errorcode %1',$error_nr) :
|
||||
lang('Contact saved');
|
||||
@ -250,4 +251,4 @@ class bocontacts extends socontacts
|
||||
$access = $access ? $access : 'public';
|
||||
return $access == 'private' ? false : $this->grants[$owner] & $needed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ class socontacts
|
||||
if($error_nr) return $error_nr_main;
|
||||
|
||||
// save customfields
|
||||
foreach ($this->customfields as $field => $options)
|
||||
foreach ((array)$this->customfields + array('ophone' => '', 'address2' => '' , 'address3' => '') as $field => $options)
|
||||
{
|
||||
$value = $contact['#'.$field];
|
||||
$data = array(
|
||||
|
Loading…
Reference in New Issue
Block a user