aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2016-01-20 14:37:01 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2016-01-20 14:37:01 +0100
commit6785f4aa749e381081b93e3db46424cc7475eab8 (patch)
treef8fb914c4febb93ee229c4b13f2488ee0c9fe2fc /src/Wallabag/ImportBundle/Import/WallabagV1Import.php
parentd481f42b7d383eb6211d1d3049d1a2c8288d9edb (diff)
downloadwallabag-6785f4aa749e381081b93e3db46424cc7475eab8.tar.gz
wallabag-6785f4aa749e381081b93e3db46424cc7475eab8.tar.zst
wallabag-6785f4aa749e381081b93e3db46424cc7475eab8.zip
[#1590] Add JSON import from wallabag v2
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV1Import.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV1Import.php18
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
12class WallabagV1Import implements ImportInterface 12class 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