remove config allowing to immediately delete InfoLog entries (as it's required for sync)

This commit is contained in:
Ralf Becker 2021-05-18 14:14:21 +02:00
parent 166718a22c
commit 87be62ce63
2 changed files with 18 additions and 28 deletions

View File

@ -359,8 +359,6 @@ class infolog_bo
if (!isset($access))
{
// handle delete for the various history modes
if ($this->history)
{
if (!is_array($info) && !($info = $this->so->read(array('info_id' => $info_id)))) return false;
if ($info['info_status'] == 'deleted' &&
@ -383,11 +381,6 @@ class infolog_bo
$access = $this->so->check_access( $info,Acl::EDIT,$this->implicit_rights == 'edit',$grants,$user );
}
}
}
elseif ($required_rights == self::ACL_UNDELETE)
{
$access = false;
}
if (!isset($access))
{
$access = $this->so->check_access( $info,$required_rights,$this->implicit_rights == 'edit',$grants,$user );
@ -705,10 +698,8 @@ class infolog_bo
$deleted['info_modifier'] = $this->user;
// if we have history switched on and not an already deleted item --> set only status deleted
if ($this->history && $info['info_status'] != 'deleted')
if ($info['info_status'] != 'deleted')
{
if ($info['info_status'] == 'deleted') return false; // entry already deleted
$this->so->write($deleted);
Link::unlink(0,'infolog',$info_id,'','!file','',true); // keep the file attachments, hide the rest

View File

@ -2557,7 +2557,6 @@ class infolog_ui
'copy_excludefields' => $excludefields,
'sub_excludefields' => $sub_excludefields,
'history' => array(
'' => lang('No'),
'history' => lang('Yes, with purging of deleted items possible'),
'history_admin_delete' => lang('Yes, only admins can purge deleted items'),
'history_no_delete' => lang('Yes, noone can purge deleted items'),