Make subclasses of ItemListFormField compatible with IMultipleFormField (#3055)
authorFabii547 <Fabii547@users.noreply.github.com>
Sun, 25 Aug 2019 13:10:09 +0000 (15:10 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 25 Aug 2019 13:10:09 +0000 (15:10 +0200)
wcfsetup/install/files/lib/system/form/builder/field/option/OptionFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/user/group/option/UserGroupOptionFormField.class.php
wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php

index a5a195723218db846ea58a4c31be55e8ecbbc836..052b82ea669a79dff7feb5895dfd66676e3d6e02 100644 (file)
@@ -28,6 +28,8 @@ class OptionFormField extends ItemListFormField implements IPackagesFormField {
         * Creates a new instance of `OptionsFormField`.
         */
        public function __construct() {
+               parent::__construct();
+               
                $this->label('wcf.form.field.option');
        }
        
index 87d0d6c985d65c053e53f1f8e255c537dfc5e645..4d65667ba4ea6610316281d26db062cda8f2d8ad 100644 (file)
@@ -28,6 +28,8 @@ class UserGroupOptionFormField extends ItemListFormField implements IPackagesFor
         * Creates a new instance of `OptionsFormField`.
         */
        public function __construct() {
+               parent::__construct();
+               
                $this->label('wcf.form.field.userGroupOption');
        }
        
index e3c6137b9cac2137e4154f7c4f1bd070014e6886..97d19c07726cce8167a2cdecbde7cd3c5fd775cb 100644 (file)
@@ -485,7 +485,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation
                                        ->objectProperty('disallowedBBCodesPermission')
                                        ->label('wcf.acp.pip.objectType.com.woltlab.wcf.message.disallowedBBCodesPermission')
                                        ->description('wcf.acp.pip.objectType.com.woltlab.wcf.message.disallowedBBCodesPermission.description')
-                                       ->maximum(1)
+                                       ->multiple(false)
                                        ->addValidator(new FormFieldValidator('optionType', function(UserGroupOptionFormField $formField) {
                                                $value = $formField->getValue();
                                                if (empty($value)) return;