mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 15:29:37 +00:00
Update PartSearchFilter.php
This commit is contained in:
parent
d903c1c931
commit
e5b3507bcc
1 changed files with 2 additions and 1 deletions
|
|
@ -148,7 +148,8 @@ class PartSearchFilter implements FilterInterface
|
||||||
params[] = new \Doctrine\ORM\Query\Parameter('id_exact', (int) $this->keyword,
|
params[] = new \Doctrine\ORM\Query\Parameter('id_exact', (int) $this->keyword,
|
||||||
ParameterType::INTEGER);
|
ParameterType::INTEGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->regex) {
|
||||||
//Convert the fields to search to a list of expressions
|
//Convert the fields to search to a list of expressions
|
||||||
$expressions = array_map(function (string $field): string {
|
$expressions = array_map(function (string $field): string {
|
||||||
return sprintf("REGEXP(%s, :search_query) = TRUE", $field);
|
return sprintf("REGEXP(%s, :search_query) = TRUE", $field);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue