diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-02 16:06:42 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-07 07:43:19 +0200 |
commit | b0458874c85060c992aa1cb78dec91ee85082b74 (patch) | |
tree | ce2e75fd05c22c28a79ee5dcd5f6fb72b02673b8 /src/Wallabag/CoreBundle/Helper | |
parent | 9d127b3b9365c73bc393bc303545f24c159cee31 (diff) | |
download | wallabag-b0458874c85060c992aa1cb78dec91ee85082b74.tar.gz wallabag-b0458874c85060c992aa1cb78dec91ee85082b74.tar.zst wallabag-b0458874c85060c992aa1cb78dec91ee85082b74.zip |
Fix relations export for Entry
Tags & Annotations weren’t really well exported.
This is now fixed (+ tests)
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/EntriesExport.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 0c627dcd..d1f1e233 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -53,10 +53,6 @@ class EntriesExport | |||
53 | 53 | ||
54 | $this->entries = $entries; | 54 | $this->entries = $entries; |
55 | 55 | ||
56 | foreach ($entries as $entry) { | ||
57 | $this->tags[] = $entry->getTags(); | ||
58 | } | ||
59 | |||
60 | return $this; | 56 | return $this; |
61 | } | 57 | } |
62 | 58 | ||
@@ -159,8 +155,8 @@ class EntriesExport | |||
159 | 155 | ||
160 | // set tags as subjects | 156 | // set tags as subjects |
161 | foreach ($this->entries as $entry) { | 157 | foreach ($this->entries as $entry) { |
162 | foreach ($this->tags as $tag) { | 158 | foreach ($entry->getTags() as $tag) { |
163 | $book->setSubject($tag['value']); | 159 | $book->setSubject($tag->getLabel()); |
164 | } | 160 | } |
165 | 161 | ||
166 | // the reader in Kobo Devices doesn't likes special caracters | 162 | // the reader in Kobo Devices doesn't likes special caracters |
@@ -265,8 +261,8 @@ class EntriesExport | |||
265 | * Adding actual entries | 261 | * Adding actual entries |
266 | */ | 262 | */ |
267 | foreach ($this->entries as $entry) { | 263 | foreach ($this->entries as $entry) { |
268 | foreach ($this->tags as $tag) { | 264 | foreach ($entry->getTags() as $tag) { |
269 | $pdf->SetKeywords($tag['value']); | 265 | $pdf->SetKeywords($tag->getLabel()); |
270 | } | 266 | } |
271 | 267 | ||
272 | $pdf->AddPage(); | 268 | $pdf->AddPage(); |