mirror of
https://github.com/standardebooks/web.git
synced 2025-07-10 00:30:28 -04:00
Add clarifying comment
This commit is contained in:
parent
cbf87487eb
commit
1a14a775d4
1 changed files with 6 additions and 2 deletions
|
@ -228,6 +228,10 @@ class Library{
|
|||
$params[] = $tokenizedQuery; // aan.Name
|
||||
$params[] = $tokenizedQuery; // t.Name
|
||||
|
||||
// We use replace() below because if there's multiple contributors separated by an underscore,
|
||||
// the underscore won't count as word boundary and we won't get a match.
|
||||
// See https://github.com/standardebooks/web/pull/325
|
||||
|
||||
$artworks = Db::Query('
|
||||
SELECT art.*
|
||||
from Artworks art
|
||||
|
@ -237,11 +241,11 @@ class Library{
|
|||
left join Tags t using (TagId)
|
||||
where ' . $statusCondition . '
|
||||
and (art.Name regexp ?
|
||||
or replace(art.EbookUrl, "_", " ") regexp ?
|
||||
or replace(art.EbookUrl, "_", " ") regexp ?
|
||||
or a.Name regexp ?
|
||||
or aan.Name regexp ?
|
||||
or t.Name regexp ?)
|
||||
group by art.ArtworkId
|
||||
group by art.ArtworkId
|
||||
order by ' . $orderBy, $params, 'Artwork');
|
||||
|
||||
return $artworks;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue