forked from extern/egroupware
Calendar CSV import fixes
- Account for non-blocking flag when checking for conflicts - Fix import of recurrence with interval
This commit is contained in:
parent
b039cccab5
commit
786b64a4da
@ -66,6 +66,10 @@ class calendar_egw_record implements importexport_iface_egw_record
|
||||
$this->record[$_attribute_name] = $data;
|
||||
}
|
||||
|
||||
public function __unset($_attribute_name) {
|
||||
unset($this->record[$_attribute_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* converts this object to array.
|
||||
* @abstract We need such a function cause PHP5
|
||||
|
@ -183,7 +183,7 @@ class calendar_import_csv extends importexport_basic_import_csv {
|
||||
{
|
||||
list($record->recur_type, $record->recur_interval) = explode('/',$record->recurrence,2);
|
||||
$record->recur_interval = trim($record->recur_interval);
|
||||
$record->recur_type = array_search(strtolower(trim($record->recur_type)), array_map('strtolower',$lookups['recurrence']));
|
||||
$record->recur_type = array_search(strtolower(trim($record->recur_type)), array_map('strtolower',$this->lookups['recurrence']));
|
||||
unset($record->recurrence);
|
||||
}
|
||||
$record->tzid = calendar_timezones::id2tz($record->tz_id);
|
||||
@ -297,7 +297,7 @@ class calendar_import_csv extends importexport_basic_import_csv {
|
||||
//print_r($_data);
|
||||
// User is interested in conflict checks, do so for dry run
|
||||
// Otherwise, conflicts are just ignored and imported anyway
|
||||
if($this->definition->plugin_options['skip_conflicts'])
|
||||
if($this->definition->plugin_options['skip_conflicts'] && !$_data['non_blocking'])
|
||||
{
|
||||
$conflicts = $this->bo->conflicts($_data);
|
||||
if($conflicts)
|
||||
@ -318,7 +318,8 @@ class calendar_import_csv extends importexport_basic_import_csv {
|
||||
);
|
||||
if(!$result)
|
||||
{
|
||||
$this->errors[$record_num] = lang('Unable to save');
|
||||
$this->errors[$record_num] = lang('Unable to save') . "\n" .
|
||||
implode("\n",$messages);
|
||||
}
|
||||
else if (is_array($result))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user