mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Fix relations export for Entry
Tags & Annotations weren’t really well exported. This is now fixed (+ tests)
This commit is contained in:
parent
9d127b3b93
commit
b0458874c8
5 changed files with 58 additions and 19 deletions
|
@ -53,10 +53,6 @@ class EntriesExport
|
|||
|
||||
$this->entries = $entries;
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$this->tags[] = $entry->getTags();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -159,8 +155,8 @@ class EntriesExport
|
|||
|
||||
// set tags as subjects
|
||||
foreach ($this->entries as $entry) {
|
||||
foreach ($this->tags as $tag) {
|
||||
$book->setSubject($tag['value']);
|
||||
foreach ($entry->getTags() as $tag) {
|
||||
$book->setSubject($tag->getLabel());
|
||||
}
|
||||
|
||||
// the reader in Kobo Devices doesn't likes special caracters
|
||||
|
@ -265,8 +261,8 @@ class EntriesExport
|
|||
* Adding actual entries
|
||||
*/
|
||||
foreach ($this->entries as $entry) {
|
||||
foreach ($this->tags as $tag) {
|
||||
$pdf->SetKeywords($tag['value']);
|
||||
foreach ($entry->getTags() as $tag) {
|
||||
$pdf->SetKeywords($tag->getLabel());
|
||||
}
|
||||
|
||||
$pdf->AddPage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue