mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Implemented an easy to use APIFilter for tags
This makes the process of filters more easily and intuitive. This fixes issue #750
This commit is contained in:
parent
01fc6524a4
commit
6225d2c9b3
3 changed files with 108 additions and 1 deletions
|
@ -85,6 +85,9 @@ class TagsConstraint extends AbstractConstraint
|
|||
*/
|
||||
protected function getExpressionForTag(QueryBuilder $queryBuilder, string $tag): Orx
|
||||
{
|
||||
//Escape any %, _ or \ in the tag
|
||||
$tag = addcslashes($tag, '%_\\');
|
||||
|
||||
$tag_identifier_prefix = uniqid($this->identifier . '_', false);
|
||||
|
||||
$expr = $queryBuilder->expr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue