mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix range query field
This commit is contained in:
@@ -59,8 +59,9 @@ class RangeExpression extends Node
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$field = $context->normalizeField($this->field->getValue());
|
||||||
$query = array();
|
$query = array();
|
||||||
$query['range'][$this->field->getValue()] = $params;
|
$query['range'][$field] = $params;
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
@@ -73,6 +73,13 @@ class QueryContext
|
|||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function normalizeField($field)
|
||||||
|
{
|
||||||
|
// TODO Private fields handling
|
||||||
|
// TODO Field label dereferencing (we only want names)
|
||||||
|
return sprintf('caption.%s', $field);
|
||||||
|
}
|
||||||
|
|
||||||
public function getFields()
|
public function getFields()
|
||||||
{
|
{
|
||||||
return $this->fields;
|
return $this->fields;
|
||||||
|
Reference in New Issue
Block a user