diff options
author | Michael <michaelvickers.uk@gmail.com> | 2018-10-16 01:39:42 +0100 |
---|---|---|
committer | fguillot <fred@kanboard.net> | 2018-10-15 17:39:42 -0700 |
commit | cc81f9d4f5a9857e024829613ad670bc51056be5 (patch) | |
tree | ff27bfd8ce38eb174e1598f90e60077dbeb39466 /app/EventBuilder | |
parent | 00228ac12fedaf436869289c7c114dc6f76dd14c (diff) |
Write log entry on file removal
Diffstat (limited to 'app/EventBuilder')
-rw-r--r-- | app/EventBuilder/TaskFileEventBuilder.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/EventBuilder/TaskFileEventBuilder.php b/app/EventBuilder/TaskFileEventBuilder.php index 8c985cc0..de514b59 100644 --- a/app/EventBuilder/TaskFileEventBuilder.php +++ b/app/EventBuilder/TaskFileEventBuilder.php @@ -64,6 +64,10 @@ class TaskFileEventBuilder extends BaseEventBuilder return e('%s attached a file to the task #%d', $author, $eventData['task']['id']); } + if ($eventName === TaskFileModel::EVENT_DESTROY) { + return e('%s removed a file from the task #%d', $author, $eventData['task']['id']); + } + return ''; } @@ -81,6 +85,10 @@ class TaskFileEventBuilder extends BaseEventBuilder return e('New attachment on task #%d: %s', $eventData['file']['task_id'], $eventData['file']['name']); } + if ($eventName === TaskFileModel::EVENT_DESTROY) { + return e('Attachment removed from task #%d: %s', $eventData['file']['task_id'], $eventData['file']['name']); + } + return ''; } } |