]> source.dussan.org Git - nextcloud-server.git/commitdiff
really check if mod_deflate is loaded
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 14 Nov 2012 12:27:19 +0000 (13:27 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Wed, 14 Nov 2012 12:27:19 +0000 (13:27 +0100)
lib/minimizer.php

index 779c08ea6e41ea3fbc7b8bbbe17be61adf1c597a..f77cd7fe504d93ea01a0fd92e30034dab6726f10 100644 (file)
@@ -36,7 +36,7 @@ abstract class OC_Minimizer {
                // on some systems (e.g. SLES 11, but not Ubuntu) mod_deflate and zlib compression will compress the output twice.
                // This results in broken core.css and  core.js. To avoid it, we switch off zlib compression.
                // Since mod_deflate is still active, Apache will compress what needs to be compressed, i.e. no disadvantage.
-               if(function_exists('apache_setenv') && ini_get('zlib.output_compression')) {
+               if(function_exists('apache_get_modules') && ini_get('zlib.output_compression') && in_array('mod_deflate', apache_get_modules())) {
                        ini_set('zlib.output_compression', 'Off');
                }
                if ($encoding = OC_Request::acceptGZip()) {