mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 01:52:02 -04:00
Code formatting
This commit is contained in:
parent
347f166e8a
commit
f9b3d09c7d
1 changed files with 3 additions and 3 deletions
|
@ -1984,7 +1984,7 @@ class Ebook{
|
||||||
$orderBy = 'e.EbookCreated desc';
|
$orderBy = 'e.EbookCreated desc';
|
||||||
if($sort == Enums\EbookSortType::AuthorAlpha){
|
if($sort == Enums\EbookSortType::AuthorAlpha){
|
||||||
$joinContributors = 'inner join Contributors con using (EbookId)';
|
$joinContributors = 'inner join Contributors con using (EbookId)';
|
||||||
$whereCondition .= ' AND con.MarcRole = "aut"';
|
$whereCondition .= ' and con.MarcRole = "aut"';
|
||||||
$orderBy = 'con.SortName, e.EbookCreated desc';
|
$orderBy = 'con.SortName, e.EbookCreated desc';
|
||||||
}
|
}
|
||||||
elseif($sort == Enums\EbookSortType::ReadingEase){
|
elseif($sort == Enums\EbookSortType::ReadingEase){
|
||||||
|
@ -1997,14 +1997,14 @@ class Ebook{
|
||||||
if(sizeof($tags) > 0 && !in_array('all', $tags)){ // 0 tags means "all ebooks"
|
if(sizeof($tags) > 0 && !in_array('all', $tags)){ // 0 tags means "all ebooks"
|
||||||
$joinTags = 'inner join EbookTags et using (EbookId)
|
$joinTags = 'inner join EbookTags et using (EbookId)
|
||||||
inner join Tags t using (TagId)';
|
inner join Tags t using (TagId)';
|
||||||
$whereCondition .= ' AND t.UrlName in ' . Db::CreateSetSql($tags) . ' ';
|
$whereCondition .= ' and t.UrlName in ' . Db::CreateSetSql($tags) . ' ';
|
||||||
$params = $tags;
|
$params = $tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($query !== null && $query != ''){
|
if($query !== null && $query != ''){
|
||||||
$query = trim(preg_replace('|[^a-zA-Z0-9 ]|ius', ' ', Formatter::RemoveDiacritics($query)));
|
$query = trim(preg_replace('|[^a-zA-Z0-9 ]|ius', ' ', Formatter::RemoveDiacritics($query)));
|
||||||
$query = sprintf('"%s"', $query); // Require an exact match via double quotes.
|
$query = sprintf('"%s"', $query); // Require an exact match via double quotes.
|
||||||
$whereCondition .= ' AND match(e.IndexableText) against(? IN BOOLEAN MODE) ';
|
$whereCondition .= ' and match(e.IndexableText) against(? in boolean mode) ';
|
||||||
$params[] = $query;
|
$params[] = $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue