namespace wcf\system\option;
use wcf\data\option\Option;
+use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\WCF;
+use wcf\util\StringUtil;
/**
* Option type implementation for float values.
return ($value1 > $value2) ? 1 : -1;
}
+ /**
+ * @inheritDoc
+ */
+ public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value)
+ {
+ if (!isset($_POST['searchOptions'][$option->optionName])) {
+ return false;
+ }
+
+ $value = StringUtil::trim($value);
+ $value = $this->toFloat($value);
+
+ $conditions->add("option_value.userOption" . $option->optionID . " LIKE ?", [$value]);
+ return true;
+ }
+
/**
* Converts a localized string value into a float value.
*/