From: Alexander Ebert Date: Thu, 18 Jun 2015 11:35:30 +0000 (+0200) Subject: Fixed boolean user group option type X-Git-Tag: 3.0.0_Beta_1~2268 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=be823eddf7c92d4af3bb8755bf45a8bc8bacc84e;p=GitHub%2FWoltLab%2FWCF.git Fixed boolean user group option type --- diff --git a/wcfsetup/install/files/acp/templates/userGroupOption.tpl b/wcfsetup/install/files/acp/templates/userGroupOption.tpl index ab6cd929d9..94017fec83 100644 --- a/wcfsetup/install/files/acp/templates/userGroupOption.tpl +++ b/wcfsetup/install/files/acp/templates/userGroupOption.tpl @@ -1,26 +1,50 @@ {include file='header'}
diff --git a/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php index 3c72f32731..99b647baaa 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php @@ -36,6 +36,14 @@ class BooleanUserGroupOptionType extends BooleanOptionType implements IUserGroup return WCF::getTPL()->fetch('userGroupBooleanOptionType'); } + /** + * @see \wcf\system\option\IOptionType::getData() + */ + public function getData(Option $option, $newValue) { + if ($newValue == -1 || $newValue == 1) return $newValue; + return 0; + } + /** * @see \wcf\system\option\IOptionType::getCSSClassName() */