From 1383eba0f51c593bf05b9ac4b045b05c4d3c16e0 Mon Sep 17 00:00:00 2001
From: Alex Cabal
Date: Wed, 16 Dec 2020 12:22:43 -0600
Subject: [PATCH] Fix incorrect series display on ebooks with more than one
series
---
www/ebooks/ebook.php | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/www/ebooks/ebook.php b/www/ebooks/ebook.php
index 841a5cef..5682aff4 100644
--- a/www/ebooks/ebook.php
+++ b/www/ebooks/ebook.php
@@ -95,7 +95,14 @@ catch(\Exception $ex){
if(sizeof($ebook->Collections) > 0){ ?>
foreach($ebook->Collections as $collection){ ?>
if($collection->SequenceNumber !== null){ ?>№ = number_format($collection->SequenceNumber) ?> in the }else{ ?>Part of the } ?> = Formatter::ToPlainText(preg_replace('/^The /ius', '', (string)$collection->Name) ?? '') ?>
- if(sizeof($ebook->Collections) == 1 && $collection->Type !== null){ ?> if(substr_compare(mb_strtolower($collection->Name), mb_strtolower($collection->Type), -strlen(mb_strtolower($collection->Type))) !== 0){ ?>= $collection->Type ?> } ?> }else{ ?>collection } ?>.
+ if($collection->Type !== null){ ?>
+ if(substr_compare(mb_strtolower($collection->Name), mb_strtolower($collection->Type), -strlen(mb_strtolower($collection->Type))) !== 0){ ?>
+ = $collection->Type ?>.
+ } ?>
+ }else{ ?>
+ collection.
+ } ?>
+
} ?>
} ?>