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:
parent
203d77b6da
commit
6e61a4632a
1 changed files with 3 additions and 4 deletions
|
@ -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>' .
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue