aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/EntriesExport.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2020-04-06 19:58:33 +0200
committerGitHub <noreply@github.com>2020-04-06 19:58:33 +0200
commitb283ee0d6d98b28623805ae00c669c1cdf638b91 (patch)
tree4c9169b1828e50f684d7ed040bd9e12bd55cbf81 /src/Wallabag/CoreBundle/Helper/EntriesExport.php
parent4d3478ec5306be248149e4f12c16cc112d5cb11b (diff)
parent0bddd348473b0d6ef6884c1e8b0c7533f601b2b1 (diff)
downloadwallabag-b283ee0d6d98b28623805ae00c669c1cdf638b91.tar.gz
wallabag-b283ee0d6d98b28623805ae00c669c1cdf638b91.tar.zst
wallabag-b283ee0d6d98b28623805ae00c669c1cdf638b91.zip
Merge pull request #4315 from wallabag/add-published-date-epub
Added publication date on epub export
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/EntriesExport.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/EntriesExport.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php
index f981ee50..1318602e 100644
--- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php
+++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php
@@ -196,10 +196,17 @@ class EntriesExport
196 $authors = implode(',', $publishedBy); 196 $authors = implode(',', $publishedBy);
197 } 197 }
198 198
199 $publishedAt = $entry->getPublishedAt();
200 $publishedDate = $this->translator->trans('export.unknown');
201 if (!empty($publishedAt)) {
202 $publishedDate = $entry->getPublishedAt()->format('Y-m-d');
203 }
204
199 $titlepage = $content_start . 205 $titlepage = $content_start .
200 '<h1>' . $entry->getTitle() . '</h1>' . 206 '<h1>' . $entry->getTitle() . '</h1>' .
201 '<dl>' . 207 '<dl>' .
202 '<dt>' . $this->translator->trans('entry.view.published_by') . '</dt><dd>' . $authors . '</dd>' . 208 '<dt>' . $this->translator->trans('entry.view.published_by') . '</dt><dd>' . $authors . '</dd>' .
209 '<dt>' . $this->translator->trans('entry.metadata.published_on') . '</dt><dd>' . $publishedDate . '</dd>' .
203 '<dt>' . $this->translator->trans('entry.metadata.reading_time') . '</dt><dd>' . $this->translator->trans('entry.metadata.reading_time_minutes_short', ['%readingTime%' => $entry->getReadingTime()]) . '</dd>' . 210 '<dt>' . $this->translator->trans('entry.metadata.reading_time') . '</dt><dd>' . $this->translator->trans('entry.metadata.reading_time_minutes_short', ['%readingTime%' => $entry->getReadingTime()]) . '</dd>' .
204 '<dt>' . $this->translator->trans('entry.metadata.added_on') . '</dt><dd>' . $entry->getCreatedAt()->format('Y-m-d') . '</dd>' . 211 '<dt>' . $this->translator->trans('entry.metadata.added_on') . '</dt><dd>' . $entry->getCreatedAt()->format('Y-m-d') . '</dd>' .
205 '<dt>' . $this->translator->trans('entry.metadata.address') . '</dt><dd><a href="' . $entry->getUrl() . '">' . $entry->getUrl() . '</a></dd>' . 212 '<dt>' . $this->translator->trans('entry.metadata.address') . '</dt><dd><a href="' . $entry->getUrl() . '">' . $entry->getUrl() . '</a></dd>' .