1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-17 17:08:37 +00:00

Merge pull request #2275 from wallabag/export-dates

Export dates from entries
This commit is contained in:
Nicolas Lœuillet 2016-09-08 18:33:09 +02:00 committed by GitHub
commit c078d18372
5 changed files with 61 additions and 4 deletions

View file

@ -101,7 +101,7 @@ class Entry
*
* @ORM\Column(name="created_at", type="datetime")
*
* @Groups({"export_all"})
* @Groups({"entries_for_user", "export_all"})
*/
private $createdAt;
@ -110,7 +110,7 @@ class Entry
*
* @ORM\Column(name="updated_at", type="datetime")
*
* @Groups({"export_all"})
* @Groups({"entries_for_user", "export_all"})
*/
private $updatedAt;

View file

@ -298,7 +298,7 @@ class EntriesExport
$enclosure = '"';
$handle = fopen('php://memory', 'rb+');
fputcsv($handle, ['Title', 'URL', 'Content', 'Tags', 'MIME Type', 'Language'], $delimiter, $enclosure);
fputcsv($handle, ['Title', 'URL', 'Content', 'Tags', 'MIME Type', 'Language', 'Creation date'], $delimiter, $enclosure);
foreach ($this->entries as $entry) {
fputcsv(
@ -311,6 +311,7 @@ class EntriesExport
implode(', ', $entry->getTags()->toArray()),
$entry->getMimetype(),
$entry->getLanguage(),
$entry->getCreatedAt()->format('d/m/Y h:i:s'),
],
$delimiter,
$enclosure