diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-02-01 14:17:20 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-02-01 14:17:20 +0100 |
commit | 85ad629a3ca209907effd75f5fd7f384f42361bc (patch) | |
tree | 6fde1374b404567153478373f3e65e63af9c1120 /src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |
parent | e43d27f8450dcdf79850e935b762ac390a19dd63 (diff) | |
parent | 6785f4aa749e381081b93e3db46424cc7475eab8 (diff) | |
download | wallabag-85ad629a3ca209907effd75f5fd7f384f42361bc.tar.gz wallabag-85ad629a3ca209907effd75f5fd7f384f42361bc.tar.zst wallabag-85ad629a3ca209907effd75f5fd7f384f42361bc.zip |
Merge pull request #1601 from wallabag/v2-import-from-v2
[#1590] Add JSON import from wallabag v2
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV1Import.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 6f8feaf3..0dac6203 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -11,12 +11,12 @@ use Wallabag\CoreBundle\Tools\Utils; | |||
11 | 11 | ||
12 | class WallabagV1Import implements ImportInterface | 12 | class WallabagV1Import implements ImportInterface |
13 | { | 13 | { |
14 | private $user; | 14 | protected $user; |
15 | private $em; | 15 | protected $em; |
16 | private $logger; | 16 | protected $logger; |
17 | private $skippedEntries = 0; | 17 | protected $skippedEntries = 0; |
18 | private $importedEntries = 0; | 18 | protected $importedEntries = 0; |
19 | private $filepath; | 19 | protected $filepath; |
20 | 20 | ||
21 | public function __construct(EntityManager $em) | 21 | public function __construct(EntityManager $em) |
22 | { | 22 | { |
@@ -72,13 +72,13 @@ class WallabagV1Import implements ImportInterface | |||
72 | public function import() | 72 | public function import() |
73 | { | 73 | { |
74 | if (!$this->user) { | 74 | if (!$this->user) { |
75 | $this->logger->error('WallabagV1Import: user is not defined'); | 75 | $this->logger->error('WallabagImport: user is not defined'); |
76 | 76 | ||
77 | return false; | 77 | return false; |
78 | } | 78 | } |
79 | 79 | ||
80 | if (!file_exists($this->filepath) || !is_readable($this->filepath)) { | 80 | if (!file_exists($this->filepath) || !is_readable($this->filepath)) { |
81 | $this->logger->error('WallabagV1Import: unable to read file', array('filepath' => $this->filepath)); | 81 | $this->logger->error('WallabagImport: unable to read file', array('filepath' => $this->filepath)); |
82 | 82 | ||
83 | return false; | 83 | return false; |
84 | } | 84 | } |
@@ -120,7 +120,7 @@ class WallabagV1Import implements ImportInterface | |||
120 | /** | 120 | /** |
121 | * @param $entries | 121 | * @param $entries |
122 | */ | 122 | */ |
123 | private function parseEntries($entries) | 123 | protected function parseEntries($entries) |
124 | { | 124 | { |
125 | $i = 1; | 125 | $i = 1; |
126 | 126 | ||