aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-09-08 18:33:09 +0200
committerGitHub <noreply@github.com>2016-09-08 18:33:09 +0200
commitc078d18372e05b09b40c34f67b7cb81446f30c4f (patch)
tree947d7b707f9eb07b013b7bda80930e9e977d155e /src/Wallabag
parent5fc79381bb51220836d1c1db4cb5e9c7dec076b9 (diff)
parent9401696fe4ac78863fa5318de9cd9765c3a139bf (diff)
downloadwallabag-c078d18372e05b09b40c34f67b7cb81446f30c4f.tar.gz
wallabag-c078d18372e05b09b40c34f67b7cb81446f30c4f.tar.zst
wallabag-c078d18372e05b09b40c34f67b7cb81446f30c4f.zip
Merge pull request #2275 from wallabag/export-dates
Export dates from entries
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php4
-rw-r--r--src/Wallabag/CoreBundle/Helper/EntriesExport.php3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 4d7e001b..c3e6b4d5 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -101,7 +101,7 @@ class Entry
101 * 101 *
102 * @ORM\Column(name="created_at", type="datetime") 102 * @ORM\Column(name="created_at", type="datetime")
103 * 103 *
104 * @Groups({"export_all"}) 104 * @Groups({"entries_for_user", "export_all"})
105 */ 105 */
106 private $createdAt; 106 private $createdAt;
107 107
@@ -110,7 +110,7 @@ class Entry
110 * 110 *
111 * @ORM\Column(name="updated_at", type="datetime") 111 * @ORM\Column(name="updated_at", type="datetime")
112 * 112 *
113 * @Groups({"export_all"}) 113 * @Groups({"entries_for_user", "export_all"})
114 */ 114 */
115 private $updatedAt; 115 private $updatedAt;
116 116
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php
index 0cf835b4..73276319 100644
--- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php
+++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php
@@ -298,7 +298,7 @@ class EntriesExport
298 $enclosure = '"'; 298 $enclosure = '"';
299 $handle = fopen('php://memory', 'rb+'); 299 $handle = fopen('php://memory', 'rb+');
300 300
301 fputcsv($handle, ['Title', 'URL', 'Content', 'Tags', 'MIME Type', 'Language'], $delimiter, $enclosure); 301 fputcsv($handle, ['Title', 'URL', 'Content', 'Tags', 'MIME Type', 'Language', 'Creation date'], $delimiter, $enclosure);
302 302
303 foreach ($this->entries as $entry) { 303 foreach ($this->entries as $entry) {
304 fputcsv( 304 fputcsv(
@@ -311,6 +311,7 @@ class EntriesExport
311 implode(', ', $entry->getTags()->toArray()), 311 implode(', ', $entry->getTags()->toArray()),
312 $entry->getMimetype(), 312 $entry->getMimetype(),
313 $entry->getLanguage(), 313 $entry->getLanguage(),
314 $entry->getCreatedAt()->format('d/m/Y h:i:s'),
314 ], 315 ],
315 $delimiter, 316 $delimiter,
316 $enclosure 317 $enclosure