From cc81f9d4f5a9857e024829613ad670bc51056be5 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 16 Oct 2018 01:39:42 +0100 Subject: Write log entry on file removal --- app/Model/FileModel.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/Model/FileModel.php') diff --git a/app/Model/FileModel.php b/app/Model/FileModel.php index d04b03bf..1519cfaf 100644 --- a/app/Model/FileModel.php +++ b/app/Model/FileModel.php @@ -51,6 +51,15 @@ abstract class FileModel extends Base */ abstract protected function fireCreationEvent($file_id); + /** + * Fire file destruction event + * + * @abstract + * @access protected + * @param integer $file_id + */ + abstract protected function fireDestructionEvent($file_id); + /** * Get PicoDb query to get all files * @@ -187,6 +196,8 @@ abstract class FileModel extends Base public function remove($file_id) { try { + $this->fireDestructionEvent($file_id); + $file = $this->getById($file_id); $this->objectStorage->remove($file['path']); -- cgit v1.2.3