aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-08 16:38:08 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-08 16:49:21 +0200
commit9401696fe4ac78863fa5318de9cd9765c3a139bf (patch)
tree84fae8a20d5203e6c58fdc7e67f56404e1eacfe2 /src/Wallabag/CoreBundle
parent6f23289e721bd14710af1acc23466432c1312850 (diff)
downloadwallabag-9401696fe4ac78863fa5318de9cd9765c3a139bf.tar.gz
wallabag-9401696fe4ac78863fa5318de9cd9765c3a139bf.tar.zst
wallabag-9401696fe4ac78863fa5318de9cd9765c3a139bf.zip
Export dates from entries
Diffstat (limited to 'src/Wallabag/CoreBundle')
-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