mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:49:10 +01:00
Fix some incorrect / unwanted import warnings
This commit is contained in:
parent
3803c4ebee
commit
8e7c09c905
@ -100,7 +100,7 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
||||
$definition->plugin_options['contact_owner'] : $this->user;
|
||||
|
||||
// Check to make sure target addressbook is valid
|
||||
if(!in_array($contact_owner, array_keys($this->bocontacts->get_addressbooks(Api\Acl::ADD))))
|
||||
if($contact_owner != 'personal' && !in_array($contact_owner, array_keys($this->bocontacts->get_addressbooks(Api\Acl::ADD))))
|
||||
{
|
||||
$this->warnings[0] = lang("Unable to import into %1, using %2",
|
||||
$contact_owner . ' (' . (is_numeric($contact_owner) ? Api\Accounts::username($contact_owner) : $contact_owner) . ')',
|
||||
|
@ -358,7 +358,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
if ($record[$name]) {
|
||||
// Automatically handle text owner without explicit translation
|
||||
$new_owner = importexport_helper_functions::account_name2id($record[$name]);
|
||||
if(!is_array($new_owner) || count($new_owner) != count(explode(',', $record[$name])))
|
||||
if(!$new_owner || is_array($record[$name]) && count($record[$name]) || $record[$name])
|
||||
{
|
||||
// Unable to parse value into account
|
||||
$warnings[] = $name . ': ' .lang('%1 is not a known user or group', $record[$name]);
|
||||
|
Loading…
Reference in New Issue
Block a user