X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FWallabagV1Import.php;h=05bdb4014239bc1535619e0aa1f76fd016ce11aa;hb=b60bff0c2a25b05399b53579e660abc41a7ba6d5;hp=c54e73b2c8d53dce1616592b289b8668e345c90b;hpb=eaf9dad777e84d50e8b3e5877b05605ad9138fee;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index c54e73b2..05bdb401 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php @@ -143,6 +143,7 @@ class WallabagV1Import implements ImportInterface // @see ContentProxy->updateEntry $entry = new Entry($this->user); $entry->setUrl($importedEntry['url']); + if (in_array($importedEntry['title'], $untitled)) { $entry = $this->contentProxy->updateEntry($entry, $importedEntry['url']); } else { @@ -151,6 +152,14 @@ class WallabagV1Import implements ImportInterface $entry->setReadingTime(Utils::getReadingTime($importedEntry['content'])); $entry->setDomainName(parse_url($importedEntry['url'], PHP_URL_HOST)); } + + if (array_key_exists('tags', $importedEntry) && $importedEntry['tags'] != '') { + $this->contentProxy->assignTagsToEntry( + $entry, + $importedEntry['tags'] + ); + } + $entry->setArchived($importedEntry['is_read']); $entry->setStarred($importedEntry['is_fav']);