diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-10-07 13:55:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-07 13:55:55 +0200 |
commit | bf71a734f64a911549e188a5c69ac8e08eec896e (patch) | |
tree | 0e40afc2a85658705fdf4a1a6b8e7c6c3d7dfbc3 /src/Wallabag/CoreBundle/Helper/EntriesExport.php | |
parent | 9d127b3b9365c73bc393bc303545f24c159cee31 (diff) | |
parent | 74e1f7433a5fc0a9bbf3942a22917e0dd1cc6923 (diff) | |
download | wallabag-bf71a734f64a911549e188a5c69ac8e08eec896e.tar.gz wallabag-bf71a734f64a911549e188a5c69ac8e08eec896e.tar.zst wallabag-bf71a734f64a911549e188a5c69ac8e08eec896e.zip |
Merge pull request #2332 from wallabag/tags-export
Fix relations export for Entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/EntriesExport.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/EntriesExport.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 0c627dcd..e50c68a6 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -21,7 +21,6 @@ class EntriesExport | |||
21 | private $entries = []; | 21 | private $entries = []; |
22 | private $authors = ['wallabag']; | 22 | private $authors = ['wallabag']; |
23 | private $language = ''; | 23 | private $language = ''; |
24 | private $tags = []; | ||
25 | private $footerTemplate = '<div style="text-align:center;"> | 24 | private $footerTemplate = '<div style="text-align:center;"> |
26 | <p>Produced by wallabag with %EXPORT_METHOD%</p> | 25 | <p>Produced by wallabag with %EXPORT_METHOD%</p> |
27 | <p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p> | 26 | <p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p> |
@@ -53,10 +52,6 @@ class EntriesExport | |||
53 | 52 | ||
54 | $this->entries = $entries; | 53 | $this->entries = $entries; |
55 | 54 | ||
56 | foreach ($entries as $entry) { | ||
57 | $this->tags[] = $entry->getTags(); | ||
58 | } | ||
59 | |||
60 | return $this; | 55 | return $this; |
61 | } | 56 | } |
62 | 57 | ||
@@ -159,8 +154,8 @@ class EntriesExport | |||
159 | 154 | ||
160 | // set tags as subjects | 155 | // set tags as subjects |
161 | foreach ($this->entries as $entry) { | 156 | foreach ($this->entries as $entry) { |
162 | foreach ($this->tags as $tag) { | 157 | foreach ($entry->getTags() as $tag) { |
163 | $book->setSubject($tag['value']); | 158 | $book->setSubject($tag->getLabel()); |
164 | } | 159 | } |
165 | 160 | ||
166 | // the reader in Kobo Devices doesn't likes special caracters | 161 | // the reader in Kobo Devices doesn't likes special caracters |
@@ -265,8 +260,8 @@ class EntriesExport | |||
265 | * Adding actual entries | 260 | * Adding actual entries |
266 | */ | 261 | */ |
267 | foreach ($this->entries as $entry) { | 262 | foreach ($this->entries as $entry) { |
268 | foreach ($this->tags as $tag) { | 263 | foreach ($entry->getTags() as $tag) { |
269 | $pdf->SetKeywords($tag['value']); | 264 | $pdf->SetKeywords($tag->getLabel()); |
270 | } | 265 | } |
271 | 266 | ||
272 | $pdf->AddPage(); | 267 | $pdf->AddPage(); |