From: Joshua Rüsweg Date: Thu, 31 Jan 2019 11:54:14 +0000 (+0100) Subject: Add function to get removed files X-Git-Tag: 5.2.0_Alpha_1~296^2~20 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bbb73ebb23f3d7b4f385179042c143ed1508975f;p=GitHub%2FWoltLab%2FWCF.git Add function to get removed files See #2825 --- 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 */