1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-30 19:22:12 +00:00

Only add preview picture to body if not already used as cover image

This commit is contained in:
Harm te Molder 2025-08-21 15:10:28 +02:00
parent 203d77b6da
commit 6e61a4632a
No known key found for this signature in database
GPG key ID: 74A98B5EEF1920BA

View file

@ -212,6 +212,9 @@ class EntriesExport
if ($entryCount > 1) { if ($entryCount > 1) {
$chapterName = "{$i}. {$entry->getTitle()}"; $chapterName = "{$i}. {$entry->getTitle()}";
$chapter = $chapterStart . "<h1>({$i}/{$entryCount}) {$entry->getTitle()}</h1>"; $chapter = $chapterStart . "<h1>({$i}/{$entryCount}) {$entry->getTitle()}</h1>";
if (null !== $entry->getPreviewPicture()) {
$chapter .= "<img src=\"{$entry->getPreviewPicture()}\">";
}
} else { } else {
$book->setDescription($entry->getUrl()); $book->setDescription($entry->getUrl());
if (null !== $entry->getPreviewPicture()) { if (null !== $entry->getPreviewPicture()) {
@ -221,10 +224,6 @@ class EntriesExport
$chapter = $chapterStart . "<h1>{$entry->getTitle()}</h1>"; $chapter = $chapterStart . "<h1>{$entry->getTitle()}</h1>";
} }
if (null !== $entry->getPreviewPicture()) {
// TODO Try to re-use the cover image from before
$chapter .= "<img src=\"{$entry->getPreviewPicture()}\">";
}
$chapter .= '<dl>' . $chapter .= '<dl>' .
'<dt>' . $this->translator->trans('entry.view.published_by') . '</dt><dd>' . $authors . '</dd>' . '<dt>' . $this->translator->trans('entry.view.published_by') . '</dt><dd>' . $authors . '</dd>' .