aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/BrowserImport.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/BrowserImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/BrowserImport.php35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 68fa8bf8..e15443c4 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -196,41 +196,6 @@ abstract class BrowserImport extends AbstractImport
196 /** 196 /**
197 * {@inheritdoc} 197 * {@inheritdoc}
198 */ 198 */
199 protected function prepareEntry(array $entry = [])
200 {
201 $url = array_key_exists('uri', $entry) ? $entry['uri'] : $entry['url'];
202 $date = array_key_exists('date_added', $entry) ? $entry['date_added'] : $entry['dateAdded'];
203 $title = array_key_exists('name', $entry) ? $entry['name'] : $entry['title'];
204
205 if (16 === strlen($date)) {
206 // firefox ...
207 $date = (int) ceil($date / 1000000);
208 } else if (17 === strlen($date)) {
209 // chrome ...
210 $date = (int) ceil($date / 10000000);
211 } else {
212 $date = '';
213 }
214
215 $data = [
216 'title' => $title,
217 'html' => '',
218 'url' => $url,
219 'is_archived' => $this->markAsRead,
220 'tags' => '',
221 'created_at' => $date,
222 ];
223
224 if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
225 $data['tags'] = $entry['tags'];
226 }
227
228 return $data;
229 }
230
231 /**
232 * {@inheritdoc}
233 */
234 protected function setEntryAsRead(array $importedEntry) 199 protected function setEntryAsRead(array $importedEntry)
235 { 200 {
236 $importedEntry['is_archived'] = 1; 201 $importedEntry['is_archived'] = 1;