From: Nicolas LÅ“uillet Date: Wed, 7 Dec 2016 15:01:50 +0000 (+0100) Subject: Fixed imports with is_starred and is_archived X-Git-Tag: 2.2.0~3^2~30^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=bb98fede2b7c3e6eba8d47b2ce560d824d166b49;p=github%2Fwallabag%2Fwallabag.git Fixed imports with is_starred and is_archived --- 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; }