From bb98fede2b7c3e6eba8d47b2ce560d824d166b49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 7 Dec 2016 16:01:50 +0100 Subject: [PATCH] Fixed imports with is_starred and is_archived --- src/Wallabag/ImportBundle/Import/ChromeImport.php | 3 ++- src/Wallabag/ImportBundle/Import/FirefoxImport.php | 3 ++- src/Wallabag/ImportBundle/Import/WallabagV2Import.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php index 1a324934..2667890f 100644 --- a/src/Wallabag/ImportBundle/Import/ChromeImport.php +++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php @@ -39,7 +39,8 @@ class ChromeImport extends BrowserImport 'title' => $entry['name'], 'html' => false, 'url' => $entry['url'], - 'is_archived' => $this->markAsRead, + 'is_archived' => (int) $this->markAsRead, + 'is_starred' => false, 'tags' => '', 'created_at' => substr($entry['date_added'], 0, 10), ]; diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php index d3f99770..c50c69b3 100644 --- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php +++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php @@ -39,7 +39,8 @@ class FirefoxImport extends BrowserImport 'title' => $entry['title'], 'html' => false, 'url' => $entry['uri'], - 'is_archived' => $this->markAsRead, + 'is_archived' => (int) $this->markAsRead, + 'is_starred' => false, 'tags' => '', 'created_at' => substr($entry['dateAdded'], 0, 10), ]; diff --git a/src/Wallabag/ImportBundle/Import/WallabagV2Import.php b/src/Wallabag/ImportBundle/Import/WallabagV2Import.php index 37c8ca14..d2a89d79 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV2Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV2Import.php @@ -36,7 +36,8 @@ class WallabagV2Import extends WallabagImport return [ 'html' => $entry['content'], 'content_type' => $entry['mimetype'], - 'is_archived' => ($entry['is_archived'] || $this->markAsRead), + 'is_archived' => (int) ($entry['is_archived'] || $this->markAsRead), + 'is_starred' => false, ] + $entry; } -- 2.41.0