summaryrefslogtreecommitdiff
path: root/plugins/import_export/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/import_export/init.php')
-rw-r--r--plugins/import_export/init.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/import_export/init.php b/plugins/import_export/init.php
index e61b62b67..b6693f05c 100644
--- a/plugins/import_export/init.php
+++ b/plugins/import_export/init.php
@@ -106,11 +106,13 @@ class Import_Export extends Plugin implements IHandler {
if (file_exists($exportname)) {
header("Content-type: text/xml");
+ $timestamp_suffix = date("Y-m-d", filemtime($exportname));
+
if (function_exists('gzencode')) {
- header("Content-Disposition: attachment; filename=TinyTinyRSS_exported.xml.gz");
+ header("Content-Disposition: attachment; filename=TinyTinyRSS_exported_${timestamp_suffix}.xml.gz");
echo gzencode(file_get_contents($exportname));
} else {
- header("Content-Disposition: attachment; filename=TinyTinyRSS_exported.xml");
+ header("Content-Disposition: attachment; filename=TinyTinyRSS_exported_${timestamp_suffix}.xml");
echo file_get_contents($exportname);
}
} else {