From 17abf458509431a2da2535b416b2a46ac7e65b19 Mon Sep 17 00:00:00 2001
From: Alex Cabal
Date: Mon, 8 Jan 2024 20:54:03 -0600
Subject: [PATCH] Fix links to existing books in in-use artwork
---
lib/Artwork.php | 2 +-
templates/ArtworkList.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Artwork.php b/lib/Artwork.php
index 9117e11c..c872fb9a 100644
--- a/lib/Artwork.php
+++ b/lib/Artwork.php
@@ -200,7 +200,7 @@ class Artwork extends PropertiesBase{
protected function GetEbook(): ?Ebook{
if($this->_Ebook === null){
- $this->_Ebook = Library::GetEbook($this->EbookWwwFilesystemPath);
+ $this->_Ebook = Library::GetEbook(EBOOKS_DIST_PATH . str_replace('_', '/', $this->EbookWwwFilesystemPath ?? ''));
}
return $this->_Ebook;
diff --git a/templates/ArtworkList.php b/templates/ArtworkList.php
index 4a9d1e77..0857f533 100644
--- a/templates/ArtworkList.php
+++ b/templates/ArtworkList.php
@@ -19,7 +19,7 @@ $showStatus = $showStatus ?? false;
if(sizeof($artwork->Artist->AlternateSpellings) > 0){ ?>(AKA = implode(', ', array_map('Formatter::ToPlainText', $artwork->Artist->AlternateSpellings)) ?>) } ?>
-
Year completed: if($artwork->CompletedYear === null){ ?>Unknown }else{ ?> if($artwork->CompletedYearIsCirca){ ?>Circa } ?>= $artwork->CompletedYear ?> } ?>
+
Year completed: if($artwork->CompletedYear === null){ ?>Unknown }else{ ?> if($artwork->CompletedYearIsCirca){ ?>Circa } ?>= $artwork->CompletedYear ?> } ?>
if($showStatus || $artwork->Status == COVER_ARTWORK_STATUS_IN_USE){ ?>
Status: = Template::ArtworkStatus(['artwork' => $artwork]) ?>
} ?>
if(count($artwork->Tags) > 0){ ?>
Tags: