aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2018-09-21 09:46:58 +0000
committerGitHub <noreply@github.com>2018-09-21 09:46:58 +0000
commit2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08 (patch)
treea145b39f411f1981444fa68ad26f8789abdfa35a /src/Wallabag/ImportBundle/Import
parent2f3af70e1ae6f9dd403e87d232ddf5315e34e430 (diff)
parent9007fe006286c63a7793326d9429792383ebd76d (diff)
downloadwallabag-2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08.tar.gz
wallabag-2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08.tar.zst
wallabag-2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08.zip
Merge pull request #3630 from sviande/archived_at
Entry: add archived_at property and updateArchived method
Diffstat (limited to 'src/Wallabag/ImportBundle/Import')
-rw-r--r--src/Wallabag/ImportBundle/Import/BrowserImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/InstapaperImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/PinboardImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/ReadabilityImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 225f1791..614386cb 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -133,7 +133,7 @@ abstract class BrowserImport extends AbstractImport
133 ); 133 );
134 } 134 }
135 135
136 $entry->setArchived($data['is_archived']); 136 $entry->updateArchived($data['is_archived']);
137 137
138 if (!empty($data['created_at'])) { 138 if (!empty($data['created_at'])) {
139 $dt = new \DateTime(); 139 $dt = new \DateTime();
diff --git a/src/Wallabag/ImportBundle/Import/InstapaperImport.php b/src/Wallabag/ImportBundle/Import/InstapaperImport.php
index e4f0970c..e113ba00 100644
--- a/src/Wallabag/ImportBundle/Import/InstapaperImport.php
+++ b/src/Wallabag/ImportBundle/Import/InstapaperImport.php
@@ -135,7 +135,7 @@ class InstapaperImport extends AbstractImport
135 ); 135 );
136 } 136 }
137 137
138 $entry->setArchived($importedEntry['is_archived']); 138 $entry->updateArchived($importedEntry['is_archived']);
139 $entry->setStarred($importedEntry['is_starred']); 139 $entry->setStarred($importedEntry['is_starred']);
140 140
141 $this->em->persist($entry); 141 $this->em->persist($entry);
diff --git a/src/Wallabag/ImportBundle/Import/PinboardImport.php b/src/Wallabag/ImportBundle/Import/PinboardImport.php
index 110b0464..9a5e8cb6 100644
--- a/src/Wallabag/ImportBundle/Import/PinboardImport.php
+++ b/src/Wallabag/ImportBundle/Import/PinboardImport.php
@@ -119,7 +119,7 @@ class PinboardImport extends AbstractImport
119 ); 119 );
120 } 120 }
121 121
122 $entry->setArchived($data['is_archived']); 122 $entry->updateArchived($data['is_archived']);
123 $entry->setStarred($data['is_starred']); 123 $entry->setStarred($data['is_starred']);
124 $entry->setCreatedAt(new \DateTime($data['created_at'])); 124 $entry->setCreatedAt(new \DateTime($data['created_at']));
125 125
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index c1b35b7e..4b1ad1d7 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -194,7 +194,7 @@ class PocketImport extends AbstractImport
194 $this->fetchContent($entry, $url); 194 $this->fetchContent($entry, $url);
195 195
196 // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted 196 // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted
197 $entry->setArchived(1 === $importedEntry['status'] || $this->markAsRead); 197 $entry->updateArchived(1 === $importedEntry['status'] || $this->markAsRead);
198 198
199 // 0 or 1 - 1 If the item is starred 199 // 0 or 1 - 1 If the item is starred
200 $entry->setStarred(1 === $importedEntry['favorite']); 200 $entry->setStarred(1 === $importedEntry['favorite']);
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
index 002b27f4..d6777582 100644
--- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
+++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
@@ -111,7 +111,7 @@ class ReadabilityImport extends AbstractImport
111 // update entry with content (in case fetching failed, the given entry will be return) 111 // update entry with content (in case fetching failed, the given entry will be return)
112 $this->fetchContent($entry, $data['url'], $data); 112 $this->fetchContent($entry, $data['url'], $data);
113 113
114 $entry->setArchived($data['is_archived']); 114 $entry->updateArchived($data['is_archived']);
115 $entry->setStarred($data['is_starred']); 115 $entry->setStarred($data['is_starred']);
116 $entry->setCreatedAt(new \DateTime($data['created_at'])); 116 $entry->setCreatedAt(new \DateTime($data['created_at']));
117 117
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index c64ccd64..916137f1 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -122,7 +122,7 @@ abstract class WallabagImport extends AbstractImport
122 $entry->setPreviewPicture($importedEntry['preview_picture']); 122 $entry->setPreviewPicture($importedEntry['preview_picture']);
123 } 123 }
124 124
125 $entry->setArchived($data['is_archived']); 125 $entry->updateArchived($data['is_archived']);
126 $entry->setStarred($data['is_starred']); 126 $entry->setStarred($data['is_starred']);
127 127
128 if (!empty($data['created_at'])) { 128 if (!empty($data['created_at'])) {