aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jbenoist@20minutes.fr>2017-06-01 11:31:45 +0200
committerJeremy Benoist <jbenoist@20minutes.fr>2017-06-01 11:31:45 +0200
commit6acadf8e98cf6021a9019773df75bdb151865687 (patch)
treec517962bd405fff9863a7fc7ed5b7d821f68f90f /src/Wallabag/ImportBundle
parent843182c7cf428b5f6b8a1ff7057adc703c1e816e (diff)
downloadwallabag-6acadf8e98cf6021a9019773df75bdb151865687.tar.gz
wallabag-6acadf8e98cf6021a9019773df75bdb151865687.tar.zst
wallabag-6acadf8e98cf6021a9019773df75bdb151865687.zip
Rewrote code & fix tests
Diffstat (limited to 'src/Wallabag/ImportBundle')
-rw-r--r--src/Wallabag/ImportBundle/Import/AbstractImport.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php
index bf568a1a..9f3d822a 100644
--- a/src/Wallabag/ImportBundle/Import/AbstractImport.php
+++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php
@@ -115,14 +115,11 @@ abstract class AbstractImport implements ImportInterface
115 */ 115 */
116 protected function fetchContent(Entry $entry, $url, array $content = []) 116 protected function fetchContent(Entry $entry, $url, array $content = [])
117 { 117 {
118 // be sure to set at least the given url
119 $content['url'] = isset($content['url']) ? $content['url'] : $url;
120
121 try { 118 try {
122 $this->contentProxy->importEntry($entry, $content, $this->disableContentUpdate); 119 $this->contentProxy->updateEntry($entry, $url, $content, $this->disableContentUpdate);
123 } catch (\Exception $e) { 120 } catch (\Exception $e) {
124 $this->logger->error('Error trying to import an entry.', [ 121 $this->logger->error('Error trying to import an entry.', [
125 'entry_url' => $content['url'], 122 'entry_url' => $url,
126 'error_msg' => $e->getMessage(), 123 'error_msg' => $e->getMessage(),
127 ]); 124 ]);
128 } 125 }