diff options
author | Andrew Dolgov <[email protected]> | 2015-09-21 12:45:25 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-09-21 12:45:25 +0300 |
commit | 77e8100669fefa0deece04bf0065807f9ce1fded (patch) | |
tree | 91a565f6d9817d5d13a32177ab48b1da382e3832 /plugins/import_export | |
parent | 73963a21b23d7b463042311a9cd666756b4d9984 (diff) |
add date suffixes to opml & import_export generated files
Diffstat (limited to 'plugins/import_export')
-rw-r--r-- | plugins/import_export/init.php | 6 |
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 { |