mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Implement delete import action
This commit is contained in:
parent
8913df2366
commit
06ab2ffcdc
@ -212,6 +212,26 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
|||||||
switch ($_action) {
|
switch ($_action) {
|
||||||
case 'none' :
|
case 'none' :
|
||||||
return true;
|
return true;
|
||||||
|
case 'delete':
|
||||||
|
if($_data['id'])
|
||||||
|
{
|
||||||
|
if ( $this->dry_run ) {
|
||||||
|
//print_r($_data);
|
||||||
|
$this->results[$_action]++;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$result = $this->bocontacts->delete($_data);
|
||||||
|
if($result && $result === true)
|
||||||
|
{
|
||||||
|
$this->results[$_action]++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Failure of some kind - unknown cause
|
||||||
|
$this->errors[$record_num] = lang('unable to delete');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'update' :
|
case 'update' :
|
||||||
// Only update if there are changes
|
// Only update if there are changes
|
||||||
$old = $this->bocontacts->read($_data['id']);
|
$old = $this->bocontacts->read($_data['id']);
|
||||||
|
Loading…
Reference in New Issue
Block a user