From 3d02a0d734e10ae7a8cae5b1f9bd718384808955 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Mon, 9 Nov 2020 15:00:20 +0100 Subject: [PATCH] Use class constant to determine the output class --- .../files/lib/acp/form/UserOptionAddForm.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; } } } -- 2.20.1