summaryrefslogtreecommitdiff
path: root/app/EventBuilder
diff options
context:
space:
mode:
authorMichael <michaelvickers.uk@gmail.com>2018-10-16 01:39:42 +0100
committerfguillot <fred@kanboard.net>2018-10-15 17:39:42 -0700
commitcc81f9d4f5a9857e024829613ad670bc51056be5 (patch)
treeff27bfd8ce38eb174e1598f90e60077dbeb39466 /app/EventBuilder
parent00228ac12fedaf436869289c7c114dc6f76dd14c (diff)
Write log entry on file removal
Diffstat (limited to 'app/EventBuilder')
-rw-r--r--app/EventBuilder/TaskFileEventBuilder.php8
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 '';
}
}