mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -04:00
Initialize empty values for some image URLs
This commit is contained in:
parent
31633ee8ac
commit
53fe66a364
1 changed files with 12 additions and 0 deletions
|
@ -464,6 +464,9 @@ final class Ebook{
|
|||
if(file_exists(WEB_ROOT . '/images/covers/' . $this->UrlSafeIdentifier . '-hero.avif')){
|
||||
$this->_HeroImageAvifUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . substr(sha1($this->Updated->format(Enums\DateTimeFormat::UnixTimestamp->value)), 0, 8) . '-hero.avif';
|
||||
}
|
||||
else{
|
||||
$this->_HeroImageAvifUrl = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_HeroImageAvifUrl;
|
||||
|
@ -482,6 +485,9 @@ final class Ebook{
|
|||
if(file_exists(WEB_ROOT . '/images/covers/' . $this->UrlSafeIdentifier . '-hero@2x.avif')){
|
||||
$this->_HeroImage2xAvifUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . substr(sha1($this->Updated->format(Enums\DateTimeFormat::UnixTimestamp->value)), 0, 8) . '-hero@2x.avif';
|
||||
}
|
||||
else{
|
||||
$this->_HeroImage2xAvifUrl = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_HeroImage2xAvifUrl;
|
||||
|
@ -500,6 +506,9 @@ final class Ebook{
|
|||
if(file_exists(WEB_ROOT . '/images/covers/' . $this->UrlSafeIdentifier . '-cover.avif')){
|
||||
$this->_CoverImageAvifUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . substr(sha1($this->Updated->format(Enums\DateTimeFormat::UnixTimestamp->value)), 0, 8) . '-cover.avif';
|
||||
}
|
||||
else{
|
||||
$this->_CoverImageAvifUrl = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_CoverImageAvifUrl;
|
||||
|
@ -518,6 +527,9 @@ final class Ebook{
|
|||
if(file_exists(WEB_ROOT . '/images/covers/' . $this->UrlSafeIdentifier . '-cover@2x.avif')){
|
||||
$this->_CoverImage2xAvifUrl = '/images/covers/' . $this->UrlSafeIdentifier . '-' . substr(sha1($this->Updated->format(Enums\DateTimeFormat::UnixTimestamp->value)), 0, 8) . '-cover@2x.avif';
|
||||
}
|
||||
else{
|
||||
$this->_CoverImage2xAvifUrl = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_CoverImage2xAvifUrl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue