diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-07-17 18:19:43 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-17 18:19:43 -0700 |
commit | 6200955003844ba9a196db72f068650f8056acda (patch) | |
tree | 697adb5d158021914e6c71f64dc2dead82e8ca84 /modules/gallery/libraries/Gallery_View.php | |
parent | bb981bb7b60d6b0155b73bbb37edb25f2f207ec0 (diff) |
Don't bother making gzencoded version of combined CSS/JS if zlib.output_compression=On
Diffstat (limited to 'modules/gallery/libraries/Gallery_View.php')
-rw-r--r-- | modules/gallery/libraries/Gallery_View.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 133066d7..4b85f2f0 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -104,7 +104,10 @@ class Gallery_View_Core extends View { } $cache->set($key, $contents, array($type), 30 * 84600); - if (function_exists("gzencode")) { + + $use_gzip = function_exists("gzencode") && + (int) ini_get("zlib.output_compression") === 0; + if ($use_gzip) { $cache->set("{$key}_gz", gzencode($contents, 9, FORCE_GZIP), array($type, "gzip"), 30 * 84600); } |