diff options
Diffstat (limited to 'src/Wallabag/ImportBundle')
-rw-r--r-- | src/Wallabag/ImportBundle/Command/ImportCommand.php | 1 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Import/AbstractImport.php | 5 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/ImportBundle/Command/ImportCommand.php index bca800e6..0829a1da 100644 --- a/src/Wallabag/ImportBundle/Command/ImportCommand.php +++ b/src/Wallabag/ImportBundle/Command/ImportCommand.php | |||
@@ -20,6 +20,7 @@ class ImportCommand extends ContainerAwareCommand | |||
20 | ->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file') | 20 | ->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file') |
21 | ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1, v2, instapaper, pinboard, readability, firefox or chrome', 'v1') | 21 | ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1, v2, instapaper, pinboard, readability, firefox or chrome', 'v1') |
22 | ->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false) | 22 | ->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false) |
23 | ->addOption('useUserId', null, InputArgument::OPTIONAL, 'Use user id instead of username to find account', false) | ||
23 | ->addOption('disableContentUpdate', null, InputOption::VALUE_NONE, 'Disable fetching updated content from URL') | 24 | ->addOption('disableContentUpdate', null, InputOption::VALUE_NONE, 'Disable fetching updated content from URL') |
24 | ; | 25 | ; |
25 | } | 26 | } |
diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php index 1f904292..bf568a1a 100644 --- a/src/Wallabag/ImportBundle/Import/AbstractImport.php +++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php | |||
@@ -24,7 +24,7 @@ abstract class AbstractImport implements ImportInterface | |||
24 | protected $producer; | 24 | protected $producer; |
25 | protected $user; | 25 | protected $user; |
26 | protected $markAsRead; | 26 | protected $markAsRead; |
27 | protected $disableContentUpdate; | 27 | protected $disableContentUpdate = false; |
28 | protected $skippedEntries = 0; | 28 | protected $skippedEntries = 0; |
29 | protected $importedEntries = 0; | 29 | protected $importedEntries = 0; |
30 | protected $queuedEntries = 0; | 30 | protected $queuedEntries = 0; |
@@ -115,6 +115,9 @@ 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 | |||
118 | try { | 121 | try { |
119 | $this->contentProxy->importEntry($entry, $content, $this->disableContentUpdate); | 122 | $this->contentProxy->importEntry($entry, $content, $this->disableContentUpdate); |
120 | } catch (\Exception $e) { | 123 | } catch (\Exception $e) { |
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 872fd642..1f0df646 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -7,12 +7,12 @@ class WallabagV1Import extends WallabagImport | |||
7 | protected $fetchingErrorMessage; | 7 | protected $fetchingErrorMessage; |
8 | protected $fetchingErrorMessageTitle; | 8 | protected $fetchingErrorMessageTitle; |
9 | 9 | ||
10 | public function __construct($em, $contentProxy, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage) | 10 | public function __construct($em, $contentProxy, $tagsAssigner, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage) |
11 | { | 11 | { |
12 | $this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle; | 12 | $this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle; |
13 | $this->fetchingErrorMessage = $fetchingErrorMessage; | 13 | $this->fetchingErrorMessage = $fetchingErrorMessage; |
14 | 14 | ||
15 | parent::__construct($em, $contentProxy, $eventDispatcher); | 15 | parent::__construct($em, $contentProxy, $tagsAssigner, $eventDispatcher); |
16 | } | 16 | } |
17 | 17 | ||
18 | /** | 18 | /** |