mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Give proper error messages for modification error as well as permissions error
This commit is contained in:
parent
102c0e569c
commit
5f1c65b31e
@ -327,12 +327,22 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin {
|
||||
break;
|
||||
} else {
|
||||
$result = $this->boinfolog->write( $_data, true, 2); // 2 = dont touch modification date
|
||||
if(!$result) {
|
||||
$this->errors[$record_num] = lang('Permissions error - %1 could not %2',
|
||||
$GLOBALS['egw']->accounts->id2name($_data['info_owner']),
|
||||
lang($_action)
|
||||
);
|
||||
} else {
|
||||
if(!$result)
|
||||
{
|
||||
if($result === false)
|
||||
{
|
||||
$this->errors[$record_num] = lang('Permissions error - %1 could not %2',
|
||||
$GLOBALS['egw']->accounts->id2name($_data['info_owner']),
|
||||
lang($_action)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errors[$record_num] = lang('Error: the entry has been updated since you opened it for editing!');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->results[$_action]++;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user