mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
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:
parent
db8d422133
commit
bb7fe5d1ac
1 changed files with 3 additions and 0 deletions
|
@ -1069,6 +1069,7 @@ class Artwork{
|
||||||
$params[] = $tokenizedQuery; // art.Name
|
$params[] = $tokenizedQuery; // art.Name
|
||||||
$params[] = $tokenizedQuery; // art.EbookUrl
|
$params[] = $tokenizedQuery; // art.EbookUrl
|
||||||
$params[] = $tokenizedQuery; // a.Name
|
$params[] = $tokenizedQuery; // a.Name
|
||||||
|
$params[] = $tokenizedQuery; // a.UrlName
|
||||||
$params[] = $tokenizedQuery; // aan.Name
|
$params[] = $tokenizedQuery; // aan.Name
|
||||||
$params[] = $tokenizedQuery; // t.Name
|
$params[] = $tokenizedQuery; // t.Name
|
||||||
|
|
||||||
|
@ -1089,6 +1090,7 @@ class Artwork{
|
||||||
and (art.Name regexp ?
|
and (art.Name regexp ?
|
||||||
or replace(art.EbookUrl, "_", " ") regexp ?
|
or replace(art.EbookUrl, "_", " ") regexp ?
|
||||||
or a.Name regexp ?
|
or a.Name regexp ?
|
||||||
|
or a.UrlName regexp ?
|
||||||
or aan.Name regexp ?
|
or aan.Name regexp ?
|
||||||
or t.Name regexp ?)
|
or t.Name regexp ?)
|
||||||
group by art.ArtworkId) x', $params);
|
group by art.ArtworkId) x', $params);
|
||||||
|
@ -1107,6 +1109,7 @@ class Artwork{
|
||||||
and (art.Name regexp ?
|
and (art.Name regexp ?
|
||||||
or replace(art.EbookUrl, "_", " ") regexp ?
|
or replace(art.EbookUrl, "_", " ") regexp ?
|
||||||
or a.Name regexp ?
|
or a.Name regexp ?
|
||||||
|
or a.UrlName regexp ?
|
||||||
or aan.Name regexp ?
|
or aan.Name regexp ?
|
||||||
or t.Name regexp ?)
|
or t.Name regexp ?)
|
||||||
group by art.ArtworkId
|
group by art.ArtworkId
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue