2 namespace wcf\system\option\user\group;
5 * User group option type implementation for integer input fields.
7 * The merge of option values returns -1 if all values are -1 otherwise the lowest
11 * @copyright 2001-2016 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package com.woltlab.wcf
14 * @subpackage system.option.user.group
15 * @category Community Framework
17 class InfiniteInverseIntegerUserGroupOptionType extends InverseIntegerUserGroupOptionType {
21 public function merge($defaultValue, $groupValue) {
22 if ($groupValue == -1 || $defaultValue == $groupValue) {
26 if ($defaultValue == -1) {
30 return min($defaultValue, $groupValue);
36 public function compare($value1, $value2) {
37 if ($value1 == $value2) {
44 else if ($value2 == -1) {
48 return ($value1 < $value2) ? 1 : -1;