From bbb73ebb23f3d7b4f385179042c143ed1508975f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Thu, 31 Jan 2019 12:54:14 +0100 Subject: [PATCH] Add function to get removed files See #2825 --- .../form/builder/field/UploadFormField.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php index 0430697c0e..49bc645f15 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php @@ -88,6 +88,19 @@ class UploadFormField extends AbstractFormField { return UploadHandler::getInstance()->getFilesByFieldId($this->getId()); } + /** + * Returns the removed files for the field. + * + * @param bool $processFiles + * @return UploadFile[] + */ + public function getRemovedFiles($processFiles = false) { + $this->registerField(); + + return UploadHandler::getInstance()->getRemovedFiledByFieldId($this->getId(), $processFiles); + } + + /** * @inheritDoc */ -- 2.20.1