mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-18 14:31:30 +00:00
only gzip xml exported data when gz functions are available
This commit is contained in:
@@ -20,9 +20,14 @@ class RPC extends Protected_Handler {
|
|||||||
|
|
||||||
if (file_exists($exportname)) {
|
if (file_exists($exportname)) {
|
||||||
header("Content-type: text/xml");
|
header("Content-type: text/xml");
|
||||||
header("Content-Disposition: attachment; filename=TinyTinyRSS_exported.xml.gz");
|
|
||||||
|
|
||||||
echo gzencode(file_get_contents($exportname));
|
if (function_exists('gzencode')) {
|
||||||
|
header("Content-Disposition: attachment; filename=TinyTinyRSS_exported.xml.gz");
|
||||||
|
echo gzencode(file_get_contents($exportname));
|
||||||
|
} else {
|
||||||
|
header("Content-Disposition: attachment; filename=TinyTinyRSS_exported.xml");
|
||||||
|
echo file_get_contents($exportname);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "File not found.";
|
echo "File not found.";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user