From 36e6ef52a176ef654eade931a23f60fd91344f2f Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Fri, 2 Dec 2016 22:42:36 -0500 Subject: Imported entries which fail to fetch get standard error body --- src/Wallabag/ImportBundle/Import/ChromeImport.php | 2 +- src/Wallabag/ImportBundle/Import/FirefoxImport.php | 2 +- src/Wallabag/ImportBundle/Import/InstapaperImport.php | 1 + src/Wallabag/ImportBundle/Import/ReadabilityImport.php | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/ImportBundle') diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php index d7620bcb..1a324934 100644 --- a/src/Wallabag/ImportBundle/Import/ChromeImport.php +++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php @@ -37,7 +37,7 @@ class ChromeImport extends BrowserImport { $data = [ 'title' => $entry['name'], - 'html' => '', + 'html' => false, 'url' => $entry['url'], 'is_archived' => $this->markAsRead, 'tags' => '', diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php index e010f5a4..d3f99770 100644 --- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php +++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php @@ -37,7 +37,7 @@ class FirefoxImport extends BrowserImport { $data = [ 'title' => $entry['title'], - 'html' => '', + 'html' => false, 'url' => $entry['uri'], 'is_archived' => $this->markAsRead, 'tags' => '', diff --git a/src/Wallabag/ImportBundle/Import/InstapaperImport.php b/src/Wallabag/ImportBundle/Import/InstapaperImport.php index cf4c785c..146a8c7c 100644 --- a/src/Wallabag/ImportBundle/Import/InstapaperImport.php +++ b/src/Wallabag/ImportBundle/Import/InstapaperImport.php @@ -76,6 +76,7 @@ class InstapaperImport extends AbstractImport 'is_starred' => $data[3] === 'Starred', 'content_type' => '', 'language' => '', + 'html' => false, ]; } fclose($handle); diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php index b8c0f777..66b00885 100644 --- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php @@ -103,6 +103,7 @@ class ReadabilityImport extends AbstractImport 'is_archived' => $importedEntry['archive'] || $this->markAsRead, 'is_starred' => $importedEntry['favorite'], 'created_at' => $importedEntry['date_added'], + 'html' => false, ]; $entry = new Entry($this->user); -- cgit v1.2.3 From 3cd6da0b749bd136758add109ed30531be224f4a Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Fri, 2 Dec 2016 23:55:30 -0500 Subject: Allow fetching content on all import types For better consistency, allow all types of imported entries to update, which was already the case for Firefox and Chrome. --- src/Wallabag/ImportBundle/Import/InstapaperImport.php | 2 -- src/Wallabag/ImportBundle/Import/PinboardImport.php | 2 -- src/Wallabag/ImportBundle/Import/ReadabilityImport.php | 2 -- src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 2 -- 4 files changed, 8 deletions(-) (limited to 'src/Wallabag/ImportBundle') diff --git a/src/Wallabag/ImportBundle/Import/InstapaperImport.php b/src/Wallabag/ImportBundle/Import/InstapaperImport.php index 146a8c7c..70a53f1a 100644 --- a/src/Wallabag/ImportBundle/Import/InstapaperImport.php +++ b/src/Wallabag/ImportBundle/Import/InstapaperImport.php @@ -74,8 +74,6 @@ class InstapaperImport extends AbstractImport 'status' => $data[3], 'is_archived' => $data[3] === 'Archive' || $data[3] === 'Starred', 'is_starred' => $data[3] === 'Starred', - 'content_type' => '', - 'language' => '', 'html' => false, ]; } diff --git a/src/Wallabag/ImportBundle/Import/PinboardImport.php b/src/Wallabag/ImportBundle/Import/PinboardImport.php index 9bcfbc36..d9865534 100644 --- a/src/Wallabag/ImportBundle/Import/PinboardImport.php +++ b/src/Wallabag/ImportBundle/Import/PinboardImport.php @@ -98,8 +98,6 @@ class PinboardImport extends AbstractImport $data = [ 'title' => $importedEntry['description'], 'url' => $importedEntry['href'], - 'content_type' => '', - 'language' => '', 'is_archived' => ('no' === $importedEntry['toread']) || $this->markAsRead, 'is_starred' => false, 'created_at' => $importedEntry['time'], diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php index 66b00885..de320d23 100644 --- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php @@ -98,8 +98,6 @@ class ReadabilityImport extends AbstractImport $data = [ 'title' => $importedEntry['article__title'], 'url' => $importedEntry['article__url'], - 'content_type' => '', - 'language' => '', 'is_archived' => $importedEntry['archive'] || $this->markAsRead, 'is_starred' => $importedEntry['favorite'], 'created_at' => $importedEntry['date_added'], diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 4f001062..59e3ce02 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php @@ -37,8 +37,6 @@ class WallabagV1Import extends WallabagImport 'title' => $entry['title'], 'html' => $entry['content'], 'url' => $entry['url'], - 'content_type' => '', - 'language' => '', 'is_archived' => $entry['is_read'] || $this->markAsRead, 'is_starred' => $entry['is_fav'], 'tags' => '', -- cgit v1.2.3