diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/BrowserImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/BrowserImport.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php index 44315e8b..da69df9b 100644 --- a/src/Wallabag/ImportBundle/Import/BrowserImport.php +++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php | |||
@@ -196,6 +196,29 @@ abstract class BrowserImport extends AbstractImport | |||
196 | /** | 196 | /** |
197 | * {@inheritdoc} | 197 | * {@inheritdoc} |
198 | */ | 198 | */ |
199 | protected function prepareEntry($entry = []) | ||
200 | { | ||
201 | $data = [ | ||
202 | 'title' => $entry['name'], | ||
203 | 'html' => '', | ||
204 | 'url' => $entry['url'], | ||
205 | 'is_archived' => $this->markAsRead, | ||
206 | 'tags' => '', | ||
207 | // date are in format like "13118829474385693" | ||
208 | // and it'll be devided by 1000 in AbstractImport | ||
209 | 'created_at' => (int) ceil($entry['date_added'] / 10000), | ||
210 | ]; | ||
211 | |||
212 | if (array_key_exists('tags', $entry) && $entry['tags'] != '') { | ||
213 | $data['tags'] = $entry['tags']; | ||
214 | } | ||
215 | |||
216 | return $data; | ||
217 | } | ||
218 | |||
219 | /** | ||
220 | * {@inheritdoc} | ||
221 | */ | ||
199 | protected function setEntryAsRead(array $importedEntry) | 222 | protected function setEntryAsRead(array $importedEntry) |
200 | { | 223 | { |
201 | $importedEntry['is_archived'] = 1; | 224 | $importedEntry['is_archived'] = 1; |