mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 02:14:45 +01:00
Backport 32252 - Make sure n_fn and n_fileas get updated when importing
This commit is contained in:
parent
2d85f00b4b
commit
2913219a3c
@ -224,13 +224,21 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
|||||||
$changed = $this->tracking->changed_fields($_data, $old);
|
$changed = $this->tracking->changed_fields($_data, $old);
|
||||||
if(count($changed) == 0) {
|
if(count($changed) == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure n_fn gets updated
|
||||||
|
unset($_data['n_fn']);
|
||||||
|
|
||||||
// Fall through
|
// Fall through
|
||||||
case 'insert' :
|
case 'insert' :
|
||||||
if($_action == 'insert') {
|
if($_action == 'insert') {
|
||||||
// Addressbook backend doesn't like inserting with ID specified, it screws up the owner & etag
|
// Addressbook backend doesn't like inserting with ID specified, it screws up the owner & etag
|
||||||
unset($_data['id']);
|
unset($_data['id']);
|
||||||
}
|
}
|
||||||
|
if(!isset($_data['org_name'])) {
|
||||||
|
// org_name is a trigger to update n_fileas
|
||||||
|
$_data['org_name'] = '';
|
||||||
|
}
|
||||||
if ( $this->dry_run ) {
|
if ( $this->dry_run ) {
|
||||||
//print_r($_data);
|
//print_r($_data);
|
||||||
$this->results[$_action]++;
|
$this->results[$_action]++;
|
||||||
|
Loading…
Reference in New Issue
Block a user