mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +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['range'][$this->field->getValue()] = $params;
|
||||
$query['range'][$field] = $params;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
@@ -73,6 +73,13 @@ class QueryContext
|
||||
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()
|
||||
{
|
||||
return $this->fields;
|
||||
|
Reference in New Issue
Block a user