mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Fix bug that ignored 'stop' in import condition, default definition
This commit is contained in:
parent
57be9157d5
commit
de8bc4771c
@ -190,7 +190,8 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
||||
// Also handle categories in their own field
|
||||
$more_categories = array();
|
||||
foreach($_definition->plugin_options['field_mapping'] as $number => $field_name) {
|
||||
if(substr($field_name,0,3) != 'cat' || !$record[$field_name] || $field_name == 'cat_id') continue;
|
||||
if(!array_key_exists($field_name, $record) ||
|
||||
substr($field_name,0,3) != 'cat' || !$record[$field_name] || $field_name == 'cat_id') continue;
|
||||
list($cat, $cat_id) = explode('-', $field_name);
|
||||
if(is_numeric($record[$field_name]) && $record[$field_name] != 1) {
|
||||
// Column has a single category ID
|
||||
@ -258,7 +259,7 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
||||
die('condition / action not supported!!!');
|
||||
break;
|
||||
}
|
||||
if ($action['last']) break;
|
||||
if ($action['stop']) break;
|
||||
}
|
||||
} else {
|
||||
// unconditional insert
|
||||
|
@ -240,25 +240,13 @@
|
||||
<entry type="string" name="stop">1</entry>
|
||||
</entry>
|
||||
</entry>
|
||||
<entry type="array" name="1">
|
||||
<entry type="string" name="string">id</entry>
|
||||
<entry type="string" name="type">exists</entry>
|
||||
<entry type="array" name="true">
|
||||
<entry type="string" name="action">update</entry>
|
||||
<entry type="string" name="stop">1</entry>
|
||||
</entry>
|
||||
<entry type="array" name="false">
|
||||
<entry type="string" name="action">insert</entry>
|
||||
<entry type="string" name="stop">1</entry>
|
||||
</entry>
|
||||
</entry>
|
||||
</entry>
|
||||
<entry type="string" name="owner_from_csv">1</entry>
|
||||
<entry type="string" name="contact_owner">personal</entry>
|
||||
<entry type="string" name="change_owner">0</entry>
|
||||
<entry type="string" name="convert">1</entry>
|
||||
</entry>
|
||||
<entry type="string" name="modified">2012-05-15 16:46:54</entry>
|
||||
<entry type="string" name="modified">2012-05-29 16:00:00</entry>
|
||||
</entry>
|
||||
</entry>
|
||||
</entry>
|
||||
|
Loading…
Reference in New Issue
Block a user