summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-10-18 22:32:40 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-10-18 22:32:40 +0200
commitc8317406a25628eef52169b2f15d7884cb36bf9c (patch)
tree7e0fb3da2aa8e36caa072ffbf63ec111b9f0bd93
parente81529bd8d8b5b43282733c8f55e9b9459b4b063 (diff)
downloadrpg-c8317406a25628eef52169b2f15d7884cb36bf9c.tar.gz
rpg-c8317406a25628eef52169b2f15d7884cb36bf9c.tar.bz2
save compressed css/js caches with io_saveFile and check for gzip support
Ignore-this: 77e61d0082fe6eb8f43059fb5da67eee darcs-hash:20091018203240-7ad00-4530a8b64af79bc844f50e3c0988e466fb09351c.gz
-rw-r--r--lib/exe/css.php2
-rw-r--r--lib/exe/js.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 263d7ff0f..f80e0af6d 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -135,7 +135,7 @@ function css_out(){
// save cache file
io_saveFile($cache,$css);
- copy($cache,"compress.zlib://$cache.gz");
+ if(function_exists('gzopen')) io_saveFile("$cache.gz",$css);
// finally send output
if ($conf['gzip_output']) {
diff --git a/lib/exe/js.php b/lib/exe/js.php
index f79023c49..42190eac7 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -127,7 +127,7 @@ function js_out(){
// save cache file
io_saveFile($cache,$js);
- copy($cache,"compress.zlib://$cache.gz");
+ if(function_exists('gzopen')) io_saveFile("$cache.gz",$js);
// finally send output
if ($conf['gzip_output']) {