mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:39:07 +01:00
Reset bo object data before each import to fix imports without ID went to the same object
This commit is contained in:
parent
3185b48c4a
commit
3dfdcee193
@ -130,6 +130,8 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
|||||||
*/
|
*/
|
||||||
protected function import_record(importexport_iface_egw_record &$record, &$import_csv)
|
protected function import_record(importexport_iface_egw_record &$record, &$import_csv)
|
||||||
{
|
{
|
||||||
|
// Reset BO data for new record
|
||||||
|
$this->bocontacts->data = array();
|
||||||
|
|
||||||
// Set owner, unless it's supposed to come from CSV file
|
// Set owner, unless it's supposed to come from CSV file
|
||||||
if($this->definition->plugin_options['owner_from_csv'] && $record->owner) {
|
if($this->definition->plugin_options['owner_from_csv'] && $record->owner) {
|
||||||
|
@ -181,6 +181,10 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin
|
|||||||
{
|
{
|
||||||
$success = false;
|
$success = false;
|
||||||
|
|
||||||
|
|
||||||
|
// Reset BO data for new record
|
||||||
|
$this->boinfolog->data = array();
|
||||||
|
|
||||||
// don't import empty records
|
// don't import empty records
|
||||||
if( count( array_unique( $record ) ) < 2 ) continue;
|
if( count( array_unique( $record ) ) < 2 ) continue;
|
||||||
|
|
||||||
|
@ -90,6 +90,9 @@ class timesheet_import_csv extends importexport_basic_import_csv
|
|||||||
*/
|
*/
|
||||||
protected function import_record(importexport_iface_egw_record &$record, &$import_csv)
|
protected function import_record(importexport_iface_egw_record &$record, &$import_csv)
|
||||||
{
|
{
|
||||||
|
// Reset BO data for new record
|
||||||
|
$this->bo->data = array();
|
||||||
|
|
||||||
// Automatically handle text Api\Categories without explicit Api\Translation
|
// Automatically handle text Api\Categories without explicit Api\Translation
|
||||||
foreach(array('ts_status','cat_id') as $field)
|
foreach(array('ts_status','cat_id') as $field)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user