diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2019-03-17 23:36:10 +0100 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2019-03-17 23:36:10 +0100 |
commit | 41d476d7e74b752e693a1b70e68b8cb05045653f (patch) | |
tree | 76061275e1d82c38481dfed01e9df8a99cafa0d6 /src/Wallabag | |
parent | a48ff25d4c9f99dfb8ec1a9a1ae296417af6d9c9 (diff) | |
download | wallabag-41d476d7e74b752e693a1b70e68b8cb05045653f.tar.gz wallabag-41d476d7e74b752e693a1b70e68b8cb05045653f.tar.zst wallabag-41d476d7e74b752e693a1b70e68b8cb05045653f.zip |
epub: fix exception when articles have the same title
This commit fixes an exception occuring when exporting as epub several
articles with the same title. The chapter filename is now derived from
title and url.
Fixes #3642
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/EntriesExport.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index a2aa4d13..f981ee50 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -188,7 +188,7 @@ class EntriesExport | |||
188 | foreach ($entry->getTags() as $tag) { | 188 | foreach ($entry->getTags() as $tag) { |
189 | $book->setSubject($tag->getLabel()); | 189 | $book->setSubject($tag->getLabel()); |
190 | } | 190 | } |
191 | $filename = sha1($entry->getTitle()); | 191 | $filename = sha1(sprintf('%s:%s', $entry->getUrl(), $entry->getTitle())); |
192 | 192 | ||
193 | $publishedBy = $entry->getPublishedBy(); | 193 | $publishedBy = $entry->getPublishedBy(); |
194 | $authors = $this->translator->trans('export.unknown'); | 194 | $authors = $this->translator->trans('export.unknown'); |