mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-15 19:19:28 +00:00
prueft beim loeschen des dok noch auf person_id
This commit is contained in:
@@ -417,16 +417,20 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
if (hasData($akte))
|
||||
{
|
||||
$result = $this->aktelib->remove($akte_id);
|
||||
|
||||
if (isError($result))
|
||||
$akte = getData($akte);
|
||||
if ($akte->person_id === $person_id)
|
||||
{
|
||||
$this->terminateWithJsonError('Error deleting document');
|
||||
$result = $this->aktelib->remove($akte_id);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithJsonError('Error deleting document');
|
||||
}
|
||||
|
||||
$this->_log($person_id, 'deletedoc', array($akte->bezeichnung));
|
||||
|
||||
$this->outputJsonSuccess('success');
|
||||
}
|
||||
|
||||
$this->_log($person_id, 'deletedoc', array(getData($akte)->bezeichnung));
|
||||
|
||||
$this->outputJsonSuccess('success');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user