Search artwork by UrlName

`Artwork::GetAllByFilter()` is already removing diacritics from search
terms, and `UrlName` stores the artist's name with diacritics removed by
calling `Formatter::MakeUrlSafe()`.

Keeping the search by `Name` because `Formatter::MakeUrlSafe()` makes
other changes to the name, too.

Fixes #461
This commit is contained in:
Mike Colagrosso 2025-01-16 16:52:30 -07:00 committed by Alex Cabal
parent db8d422133
commit bb7fe5d1ac

View file

@ -1069,6 +1069,7 @@ class Artwork{
$params[] = $tokenizedQuery; // art.Name
$params[] = $tokenizedQuery; // art.EbookUrl
$params[] = $tokenizedQuery; // a.Name
$params[] = $tokenizedQuery; // a.UrlName
$params[] = $tokenizedQuery; // aan.Name
$params[] = $tokenizedQuery; // t.Name
@ -1089,6 +1090,7 @@ class Artwork{
and (art.Name regexp ?
or replace(art.EbookUrl, "_", " ") regexp ?
or a.Name regexp ?
or a.UrlName regexp ?
or aan.Name regexp ?
or t.Name regexp ?)
group by art.ArtworkId) x', $params);
@ -1107,6 +1109,7 @@ class Artwork{
and (art.Name regexp ?
or replace(art.EbookUrl, "_", " ") regexp ?
or a.Name regexp ?
or a.UrlName regexp ?
or aan.Name regexp ?
or t.Name regexp ?)
group by art.ArtworkId