From: Tim Düsterhus Date: Mon, 28 Jun 2021 15:00:08 +0000 (+0200) Subject: Use RejectEverythingFormField in PackageEnableUpgradeOverrideForm X-Git-Tag: 5.4.0_RC_1~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5fb8d8f685822ff5ed9cbedc4d308a5bcbae3886;p=GitHub%2FWoltLab%2FWCF.git Use RejectEverythingFormField in PackageEnableUpgradeOverrideForm --- diff --git a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php index 9ab9b183ec..96037f68d8 100644 --- a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php @@ -5,9 +5,8 @@ namespace wcf\acp\form; use wcf\data\package\update\server\PackageUpdateServer; use wcf\form\AbstractForm; use wcf\form\AbstractFormBuilderForm; -use wcf\system\form\builder\field\AbstractFormField; use wcf\system\form\builder\field\BooleanFormField; -use wcf\system\form\builder\field\validation\FormFieldValidationError; +use wcf\system\form\builder\field\RejectEverythingFormField; use wcf\system\form\builder\TemplateFormNode; use wcf\system\registry\RegistryHandler; use wcf\system\WCF; @@ -61,33 +60,7 @@ final class PackageEnableUpgradeOverrideForm extends AbstractFormBuilderForm ->variables([ 'issues' => $issues, ]), - new class extends AbstractFormField { - // TODO: Replace this with RejectEverythingFormField in 5.4+. - public function __construct() - { - $this->id('rejectEverything'); - } - - public function getFieldHtml() - { - return ''; - } - - public function getHtml() - { - return ''; - } - - public function readValue() - { - return $this; - } - - public function validate() - { - $this->addValidationError(new FormFieldValidationError('rejectEverything')); - } - }, + RejectEverythingFormField::create(), ]); } }