diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-10-31 15:10:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-31 15:10:41 +0200 |
commit | 494b47f29915cc881cfeba14c16b728d3adcb85a (patch) | |
tree | 926b5b24e66850931d7fac8d89a6a0630e6ed0fa /src/Wallabag | |
parent | 1953a872932a63792293b4aec087880265ba89f7 (diff) | |
parent | 15a6402f758b050d8019c32a59617115421b6bca (diff) | |
download | wallabag-494b47f29915cc881cfeba14c16b728d3adcb85a.tar.gz wallabag-494b47f29915cc881cfeba14c16b728d3adcb85a.tar.zst wallabag-494b47f29915cc881cfeba14c16b728d3adcb85a.zip |
Merge pull request #3392 from mart-e/add-title-page-epub
add the title of article on the epub export
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/EntriesExport.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 830798b8..136f66f5 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -174,8 +174,6 @@ class EntriesExport | |||
174 | $book->setCoverImage('Cover.png', file_get_contents($this->logoPath), 'image/png'); | 174 | $book->setCoverImage('Cover.png', file_get_contents($this->logoPath), 'image/png'); |
175 | } | 175 | } |
176 | 176 | ||
177 | $book->buildTOC(); | ||
178 | |||
179 | /* | 177 | /* |
180 | * Adding actual entries | 178 | * Adding actual entries |
181 | */ | 179 | */ |
@@ -190,11 +188,13 @@ class EntriesExport | |||
190 | // in filenames, we limit to A-z/0-9 | 188 | // in filenames, we limit to A-z/0-9 |
191 | $filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle()); | 189 | $filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle()); |
192 | 190 | ||
191 | $titlepage = $content_start . '<h1>' . $entry->getTitle() . '</h1>' . $this->getExportInformation('PHPePub') . $bookEnd; | ||
192 | $book->addChapter('Title', 'Title.html', $titlepage, true, EPub::EXTERNAL_REF_ADD); | ||
193 | $chapter = $content_start . $entry->getContent() . $bookEnd; | 193 | $chapter = $content_start . $entry->getContent() . $bookEnd; |
194 | $book->addChapter($entry->getTitle(), htmlspecialchars($filename) . '.html', $chapter, true, EPub::EXTERNAL_REF_ADD); | 194 | $book->addChapter($entry->getTitle(), htmlspecialchars($filename) . '.html', $chapter, true, EPub::EXTERNAL_REF_ADD); |
195 | } | 195 | } |
196 | 196 | ||
197 | $book->addChapter('Notices', 'Cover2.html', $content_start . $this->getExportInformation('PHPePub') . $bookEnd); | 197 | $book->buildTOC(); |
198 | 198 | ||
199 | return Response::create( | 199 | return Response::create( |
200 | $book->getBook(), | 200 | $book->getBook(), |