1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 02:04:35 +02:00
This commit is contained in:
Ryan Cramer
2020-05-15 12:24:47 -04:00
parent 0543548fdd
commit f11abdc99d
2 changed files with 3 additions and 2 deletions

View File

@@ -237,12 +237,13 @@ class Selectors extends WireArray {
$selectorTypes = self::$selectorTypes;
if(!empty($options['operator'])) {
$selectorTypes = array($selectorTypes[$options['operator']]);
$selectorTypes = array($options['operator'] => $selectorTypes[$options['operator']]);
}
foreach($selectorTypes as $operator => $typeName) {
$className = __NAMESPACE__ . "\\$typeName";
if($compareType) {
/** @var Selector $className */
if(!($className::getCompareType() & $options['compareType'])) continue;
}
if($valueType === 'class') {

View File

@@ -785,7 +785,7 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
$field = $query->field;
$schema = $this->getDatabaseSchema($field);
$compareType = Selectors::getOperators(array('valueType' => 'compareType', 'operator' => $operator));
$compareType = Selectors::getOperators(array('getValueType' => 'compareType', 'operator' => $operator));
$isFindOperator = $compareType & Selector::compareTypeFind;
$isInvalidOperator = false;
$isInvalidSubfield = false;