diff --git a/www/ebooks/ebook.php b/www/ebooks/ebook.php index f9032899..f8dfd9c6 100644 --- a/www/ebooks/ebook.php +++ b/www/ebooks/ebook.php @@ -91,11 +91,10 @@ catch(\Exception $ex){
= $ebook->ContributorsHtml ?>
} ?> if(sizeof($ebook->Collections) > 0){ ?> -if(sizeof($ebook->Collections) == 1 && $ebook->Collections[0]->SequenceNumber !== null){ ?>№ = number_format($ebook->Collections[0]->SequenceNumber) ?> in the }else{ ?>Part of the } ?> - for($i = 0; $i < sizeof($ebook->Collections); $i++){ ?> - = Formatter::ToPlainText(preg_replace('/^The /ius', '', (string)$ebook->Collections[$i]->Name) ?? '') ?> if(sizeof($ebook->Collections) > 2){ ?> if($i == sizeof($ebook->Collections) - 2){ ?>, and }elseif($i != sizeof($ebook->Collections) - 1){ ?>, } ?> }elseif($i == sizeof($ebook->Collections) - 2){ ?> and } ?> - } ?> - if(sizeof($ebook->Collections) == 1 && $ebook->Collections[0]->Type !== null){ ?> if(substr_compare(mb_strtolower($ebook->Collections[0]->Name), mb_strtolower($ebook->Collections[0]->Type), -strlen(mb_strtolower($ebook->Collections[0]->Type))) !== 0){ ?>= $ebook->Collections[0]->Type ?> } ?> }else{ ?>collection if(sizeof($ebook->Collections) > 1){ ?>s } ?> } ?>.
+ 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 } ?>
+ } ?> } ?>