mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +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') . ' ) ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user