mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 01:22:23 -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; // aan.Name
|
||||||
$params[] = $tokenizedQuery; // t.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('
|
$artworks = Db::Query('
|
||||||
SELECT art.*
|
SELECT art.*
|
||||||
from Artworks art
|
from Artworks art
|
||||||
|
@ -237,11 +241,11 @@ class Library{
|
||||||
left join Tags t using (TagId)
|
left join Tags t using (TagId)
|
||||||
where ' . $statusCondition . '
|
where ' . $statusCondition . '
|
||||||
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 aan.Name regexp ?
|
or aan.Name regexp ?
|
||||||
or t.Name regexp ?)
|
or t.Name regexp ?)
|
||||||
group by art.ArtworkId
|
group by art.ArtworkId
|
||||||
order by ' . $orderBy, $params, 'Artwork');
|
order by ' . $orderBy, $params, 'Artwork');
|
||||||
|
|
||||||
return $artworks;
|
return $artworks;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue