Create an audit entry in case of rejecting the removal of the message

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2021-04-26 06:30:14 +02:00
parent 6c68a25b63
commit 98b4c3c387
13 changed files with 17 additions and 1 deletions

View File

@ -66,6 +66,7 @@ class ControllerAuditHelper extends Controller {
$this->data['actions'][ACTION_VIEW_JOURNAL] = $this->data['text_view_journal'];
$this->data['actions'][ACTION_MARK_MESSAGE_FOR_REMOVAL] = $this->data['text_remove_request'];
$this->data['actions'][ACTION_MARK_AS_PRIVATE] = $this->data['text_mark_private'];
$this->data['actions'][ACTION_REJECT_REMOVAL] = $this->data['text_reject_removal'];

View File

@ -37,6 +37,8 @@ class ControllerMessageRejectRemove extends Controller {
// Shouldn't we ask for a token or something as well?
AUDIT(ACTION_REJECT_REMOVAL, '', '', $id, '');
$db->query("UPDATE " . TABLE_DELETED . " SET deleted=0, approver=?, date2=?, reason2=? WHERE id=?", [$this->data['username'], NOW, $this->request->post['reason2'], $id]);
syslog(LOG_INFO, $this->data['username'] . " rejected removing message: $id");