X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FChromeImport.php;h=2667890f0287791bd47ce3418ab1017f2616be6f;hb=6fb06904ecde15b1b07d0a2af945338b416cf0e2;hp=60602a1bdecbda0a96bb61b5a715f6cbdf5d32a0;hpb=27acc6ddb8b0a1549a3f015171621e3056ef65d2;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php index 60602a1b..2667890f 100644 --- a/src/Wallabag/ImportBundle/Import/ChromeImport.php +++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php @@ -29,4 +29,26 @@ class ChromeImport extends BrowserImport { return 'import.chrome.description'; } + + /** + * {@inheritdoc} + */ + protected function prepareEntry(array $entry = []) + { + $data = [ + 'title' => $entry['name'], + 'html' => false, + 'url' => $entry['url'], + 'is_archived' => (int) $this->markAsRead, + 'is_starred' => false, + 'tags' => '', + 'created_at' => substr($entry['date_added'], 0, 10), + ]; + + if (array_key_exists('tags', $entry) && $entry['tags'] != '') { + $data['tags'] = $entry['tags']; + } + + return $data; + } }