From: joshuaruesweg Date: Mon, 9 Nov 2020 14:00:20 +0000 (+0100) Subject: Use class constant to determine the output class X-Git-Tag: 5.4.0_Alpha_1~604^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d02a0d734e10ae7a8cae5b1f9bd718384808955;p=GitHub%2FWoltLab%2FWCF.git Use class constant to determine the output class --- diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php index fc6e6f3c63..231b16ccce 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php @@ -8,6 +8,9 @@ use wcf\data\user\option\UserOptionEditor; use wcf\form\AbstractForm; use wcf\system\exception\UserInputException; use wcf\system\language\I18nHandler; +use wcf\system\option\user\DateUserOptionOutput; +use wcf\system\option\user\SelectOptionsUserOptionOutput; +use wcf\system\option\user\URLUserOptionOutput; use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\util\StringUtil; @@ -225,15 +228,15 @@ class UserOptionAddForm extends AbstractForm { protected function setDefaultOutputClass() { if (empty($this->outputClass)) { if (in_array($this->optionType, self::$optionTypesUsingSelectOptions)) { - $this->outputClass = 'wcf\system\option\user\SelectOptionsUserOptionOutput'; + $this->outputClass = SelectOptionsUserOptionOutput::class; } if ($this->optionType == 'date') { - $this->outputClass = 'wcf\system\option\user\DateUserOptionOutput'; + $this->outputClass = DateUserOptionOutput::class; } if ($this->optionType == 'URL') { - $this->outputClass = 'wcf\system\option\user\URLUserOptionOutput'; + $this->outputClass = URLUserOptionOutput::class; } } }