aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJerome Charaoui <jerome@riseup.net>2016-12-02 22:42:36 -0500
committerJerome Charaoui <jerome@riseup.net>2016-12-02 22:42:36 -0500
commit36e6ef52a176ef654eade931a23f60fd91344f2f (patch)
tree05a859396e95e51287aa6180d3a21d81600c7014 /src/Wallabag
parent29dca43236001221be947179df0caa8aee966f6d (diff)
downloadwallabag-36e6ef52a176ef654eade931a23f60fd91344f2f.tar.gz
wallabag-36e6ef52a176ef654eade931a23f60fd91344f2f.tar.zst
wallabag-36e6ef52a176ef654eade931a23f60fd91344f2f.zip
Imported entries which fail to fetch get standard error body
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/ChromeImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/FirefoxImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/InstapaperImport.php1
-rw-r--r--src/Wallabag/ImportBundle/Import/ReadabilityImport.php1
5 files changed, 5 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 77acbd6c..642ba6f9 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -63,7 +63,7 @@ class ContentProxy
63 63
64 $html = $content['html']; 64 $html = $content['html'];
65 if (false === $html) { 65 if (false === $html) {
66 $html = '<p>Unable to retrieve readable content.</p>'; 66 $html = $this->fetchingErrorMessage;
67 67
68 if (isset($content['open_graph']['og_description'])) { 68 if (isset($content['open_graph']['og_description'])) {
69 $html .= '<p><i>But we found a short description: </i></p>'; 69 $html .= '<p><i>But we found a short description: </i></p>';
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
37 { 37 {
38 $data = [ 38 $data = [
39 'title' => $entry['name'], 39 'title' => $entry['name'],
40 'html' => '', 40 'html' => false,
41 'url' => $entry['url'], 41 'url' => $entry['url'],
42 'is_archived' => $this->markAsRead, 42 'is_archived' => $this->markAsRead,
43 'tags' => '', 43 '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
37 { 37 {
38 $data = [ 38 $data = [
39 'title' => $entry['title'], 39 'title' => $entry['title'],
40 'html' => '', 40 'html' => false,
41 'url' => $entry['uri'], 41 'url' => $entry['uri'],
42 'is_archived' => $this->markAsRead, 42 'is_archived' => $this->markAsRead,
43 'tags' => '', 43 '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
76 'is_starred' => $data[3] === 'Starred', 76 'is_starred' => $data[3] === 'Starred',
77 'content_type' => '', 77 'content_type' => '',
78 'language' => '', 78 'language' => '',
79 'html' => false,
79 ]; 80 ];
80 } 81 }
81 fclose($handle); 82 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
103 'is_archived' => $importedEntry['archive'] || $this->markAsRead, 103 'is_archived' => $importedEntry['archive'] || $this->markAsRead,
104 'is_starred' => $importedEntry['favorite'], 104 'is_starred' => $importedEntry['favorite'],
105 'created_at' => $importedEntry['date_added'], 105 'created_at' => $importedEntry['date_added'],
106 'html' => false,
106 ]; 107 ];
107 108
108 $entry = new Entry($this->user); 109 $entry = new Entry($this->user);