mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
[SearchEngine] Fix tests
This commit is contained in:
@@ -577,10 +577,10 @@ class PhraseaEngine implements SearchEngineInterface
|
||||
}
|
||||
if (($this->options->getMinDate() || $this->options->getMaxDate()) && $this->options->getDateFields()) {
|
||||
if ($this->options->getMinDate()) {
|
||||
$this->queries[$sbas] .= ' AND ( ' . implode(' >= ' . $this->options->getMinDate()->format('Y-m-d') . ' OR ', $this->options->getDateFields()) . ' >= ' . $this->options->getMinDate()->format('Y-m-d') . ' ) ';
|
||||
$this->queries[$sbas] .= ' AND ( ' . implode(' >= ' . $this->options->getMinDate()->format('Y-m-d') . ' OR ', array_map(function(\databox_field $field){ return $field->get_name(); }, $this->options->getDateFields())) . ' >= ' . $this->options->getMinDate()->format('Y-m-d') . ' ) ';
|
||||
}
|
||||
if ($this->options->getMaxDate()) {
|
||||
$this->queries[$sbas] .= ' AND ( ' . implode(' <= ' . $this->options->getMaxDate()->format('Y-m-d') . ' OR ', $this->options->getDateFields()) . ' <= ' . $this->options->getMaxDate()->format('Y-m-d') . ' ) ';
|
||||
$this->queries[$sbas] .= ' AND ( ' . implode(' <= ' . $this->options->getMaxDate()->format('Y-m-d') . ' OR ', array_map(function(\databox_field $field){ return $field->get_name(); }, $this->options->getDateFields())) . ' <= ' . $this->options->getMaxDate()->format('Y-m-d') . ' ) ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -417,7 +417,7 @@
|
||||
<option onchange="checkFilters(true);"
|
||||
class="" value="{{ field }}">{{ field }}</option>
|
||||
{% endfor %}
|
||||
<option value="{{configuration['date_fields']|keys|join('|')}}" selected="selected">
|
||||
<option value="{{ app['phraseanet.SE'].getAvailableDateFields()|join('|') }}" selected="selected">
|
||||
{% trans 'rechercher dans tous les champs' %}
|
||||
</option>
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user