]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Imported entries which fail to fetch get standard error body
authorJerome Charaoui <jerome@riseup.net>
Sat, 3 Dec 2016 03:42:36 +0000 (22:42 -0500)
committerJerome Charaoui <jerome@riseup.net>
Sat, 3 Dec 2016 03:42:36 +0000 (22:42 -0500)
src/Wallabag/CoreBundle/Helper/ContentProxy.php
src/Wallabag/ImportBundle/Import/ChromeImport.php
src/Wallabag/ImportBundle/Import/FirefoxImport.php
src/Wallabag/ImportBundle/Import/InstapaperImport.php
src/Wallabag/ImportBundle/Import/ReadabilityImport.php

index 77acbd6c2577b11ac5b0f048e0531bbf74837c2d..642ba6f9cad9eff9945463c7e8d949a73adad71d 100644 (file)
@@ -63,7 +63,7 @@ class ContentProxy
 
         $html = $content['html'];
         if (false === $html) {
-            $html = '<p>Unable to retrieve readable content.</p>';
+            $html = $this->fetchingErrorMessage;
 
             if (isset($content['open_graph']['og_description'])) {
                 $html .= '<p><i>But we found a short description: </i></p>';
index d7620bcb76139676611610bc92a6fcdc7437072b..1a3249349fd0b51461204f67ce5cd03fe6865d4a 100644 (file)
@@ -37,7 +37,7 @@ class ChromeImport extends BrowserImport
     {
         $data = [
             'title' => $entry['name'],
-            'html' => '',
+            'html' => false,
             'url' => $entry['url'],
             'is_archived' => $this->markAsRead,
             'tags' => '',
index e010f5a46f5124cf51fd9ceb85ded702005d078b..d3f997703f0170f784a8f3a59783a5a20d6b0756 100644 (file)
@@ -37,7 +37,7 @@ class FirefoxImport extends BrowserImport
     {
         $data = [
             'title' => $entry['title'],
-            'html' => '',
+            'html' => false,
             'url' => $entry['uri'],
             'is_archived' => $this->markAsRead,
             'tags' => '',
index cf4c785ce8dca325d3ab0b93a07a3b7e09b484bc..146a8c7c49f003724f50869e32f725e5b11366ba 100644 (file)
@@ -76,6 +76,7 @@ class InstapaperImport extends AbstractImport
                 'is_starred' => $data[3] === 'Starred',
                 'content_type' => '',
                 'language' => '',
+                'html' => false,
             ];
         }
         fclose($handle);
index b8c0f777094e8d33a3645d528560df0d19812183..66b00885094ee832ba601a4802de2362ad09b97e 100644 (file)
@@ -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);