1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:25:59 +00:00

add date suffixes to opml & import_export generated files

This commit is contained in:
Andrew Dolgov
2015-09-21 12:45:25 +03:00
parent 73963a21b2
commit 77e8100669
2 changed files with 7 additions and 3 deletions

View File

@@ -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 {