3 namespace Wallabag\ImportBundle\Import
;
5 class WallabagV1Import
extends WallabagImport
10 public function getName()
18 public function getUrl()
20 return 'import_wallabag_v1';
26 public function getDescription()
28 return 'import.wallabag_v1.description';
34 protected function prepareEntry($entry = [])
37 'title' => $entry['title'],
38 'html' => $entry['content'],
39 'url' => $entry['url'],
40 'is_archived' => $entry['is_read'] || $this->markAsRead
,
41 'is_starred' => $entry['is_fav'],
46 // force content to be refreshed in case on bad fetch in the v1 installation
47 if (in_array($entry['title'], $this->untitled
)) {
52 if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
53 $data['tags'] = $entry['tags'];
62 protected function setEntryAsRead(array $importedEntry)
64 $importedEntry['is_read'] = 1;
66 return $importedEntry;