diff options
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/EntriesExport.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 1b4afa3b..5d2fca31 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,12 +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 | ||
193 | $titlepage = "<h1>".$entry->getTitle()."</h1>"; | 191 | $titlepage = $content_start . "<h1>".$entry->getTitle()."</h1>" . $this->getExportInformation('PHPePub') . $bookEnd; |
194 | $chapter = $content_start . $titlepage . $entry->getContent() . $bookEnd; | 192 | $book->addChapter("Title", 'Title.html', $titlepage, true, EPub::EXTERNAL_REF_ADD); |
193 | $chapter = $content_start . $entry->getContent() . $bookEnd; | ||
195 | $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); |
196 | } | 195 | } |
197 | 196 | ||
198 | $book->addChapter('Notices', 'Cover2.html', $content_start . $this->getExportInformation('PHPePub') . $bookEnd); | 197 | $book->buildTOC(); |
199 | 198 | ||
200 | return Response::create( | 199 | return Response::create( |
201 | $book->getBook(), | 200 | $book->getBook(), |