summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-12-28 11:03:24 +0400
committerAndrew Dolgov <[email protected]>2011-12-28 11:03:24 +0400
commitdddd80cf1bf0254c36b74531e33647e224e67993 (patch)
tree4c02c54f40eef6e12170bc8cd6564fa593af6fe1 /classes
parent8015933d2d4be28ccd42f1acb4178067ec328d88 (diff)
only gzip xml exported data when gz functions are available
Diffstat (limited to 'classes')
-rw-r--r--classes/rpc.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index c55d13f9a..1da3a14ec 100644
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -20,9 +20,14 @@ class RPC extends Protected_Handler {
if (file_exists($exportname)) {
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 {
echo "File not found.";
}