@@ -19,6+19,7 @@ class WallabagV1Import implements ImportInterface
protected $skippedEntries = 0;
protected $importedEntries = 0;
protected $filepath;
protected $skippedEntries = 0;
protected $importedEntries = 0;
protected $filepath;
+ protected $markAsRead;
public function __construct(EntityManager $em, ContentProxy $contentProxy)
{
public function __construct(EntityManager $em, ContentProxy $contentProxy)
{
@@ -66,7+67,7 @@ class WallabagV1Import implements ImportInterface
*/
public function getDescription()
{
*/
public function getDescription()
{
- return 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.';
+ return 'import.wallabag_v1.description';
}
/**
}
/**
@@ -120,6+121,18 @@ class WallabagV1Import implements ImportInterface
return $this;
}
return $this;
}
+ /**
+ * Set whether articles must be all marked as read.
+ *
+ * @param bool $markAsRead
+ */
+ public function setMarkAsRead($markAsRead)
+ {
+ $this->markAsRead = $markAsRead;
+
+ return $this;
+ }
+
/**
* @param $entries
*/
/**
* @param $entries
*/
@@ -143,6+156,7 @@ class WallabagV1Import implements ImportInterface
// @see ContentProxy->updateEntry
$entry = new Entry($this->user);
$entry->setUrl($importedEntry['url']);
// @see ContentProxy->updateEntry
$entry = new Entry($this->user);
$entry->setUrl($importedEntry['url']);
+
if (in_array($importedEntry['title'], $untitled)) {