mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Add ability to specify that imported contacts go to importer's personal addressbook
This commit is contained in:
parent
632a91774d
commit
d6bf31a1b1
@ -135,9 +135,15 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
|||||||
|
|
||||||
$_lookups = array();
|
$_lookups = array();
|
||||||
|
|
||||||
// set eventOwner
|
// set contact owner
|
||||||
$_definition->plugin_options['contact_owner'] = isset( $_definition->plugin_options['contact_owner'] ) ?
|
|
||||||
|
$contact_owner = isset( $_definition->plugin_options['contact_owner'] ) ?
|
||||||
$_definition->plugin_options['contact_owner'] : $this->user;
|
$_definition->plugin_options['contact_owner'] : $this->user;
|
||||||
|
// Import into importer's personal addressbook
|
||||||
|
if($contact_owner == 'personal')
|
||||||
|
{
|
||||||
|
$contact_owner = $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
// Start counting successes
|
// Start counting successes
|
||||||
$count = 0;
|
$count = 0;
|
||||||
@ -163,15 +169,15 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
|||||||
$this->errors[$import_csv->get_current_position()] = lang(
|
$this->errors[$import_csv->get_current_position()] = lang(
|
||||||
'Unable to convert "%1" to account ID. Using plugin setting (%2) for owner.',
|
'Unable to convert "%1" to account ID. Using plugin setting (%2) for owner.',
|
||||||
$record['owner'],
|
$record['owner'],
|
||||||
common::grab_owner_name($_definition->plugin_options['contact_owner'])
|
common::grab_owner_name($contact_owner)
|
||||||
);
|
);
|
||||||
$record['owner'] = $_definition->plugin_options['contact_owner'];
|
$record['owner'] = $contact_owner;
|
||||||
} else {
|
} else {
|
||||||
$record['owner'] = $new_owner;
|
$record['owner'] = $new_owner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$record['owner'] = $_definition->plugin_options['contact_owner'];
|
$record['owner'] = $contact_owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically handle text categories without explicit translation
|
// Automatically handle text categories without explicit translation
|
||||||
|
@ -112,7 +112,7 @@ class addressbook_wizard_import_contacts_csv extends importexport_wizard_basic_i
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bocontacts = new addressbook_bo();
|
$bocontacts = new addressbook_bo();
|
||||||
$sel_options['contact_owner'] = $bocontacts->get_addressbooks(EGW_ACL_ADD);
|
$sel_options['contact_owner'] = array('personal' => lang("Importer's personal")) + $bocontacts->get_addressbooks(EGW_ACL_ADD);
|
||||||
if(!in_array('owner', $content['field_mapping'])) {
|
if(!in_array('owner', $content['field_mapping'])) {
|
||||||
$content['no_owner_map'] = true;
|
$content['no_owner_map'] = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user