diff --git a/ChangeLog b/ChangeLog index 242686236e..e65c28febc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -97,6 +97,7 @@ underscore - bug #3829 Enabling query profiling crashes javascript based navigation + rfe #879 Reserved word warning + Remove the database ordering sub-feature of the only_db directive +bug #3840 When exporting to gzip format, the data is compressed 2 times 3.5.8.0 (not yet released) - bug #3828 MariaDB reported as MySQL diff --git a/export.php b/export.php index 88fab5f7ad..3db4231799 100644 --- a/export.php +++ b/export.php @@ -137,6 +137,17 @@ $dump_buffer_len = 0; // We send fake headers to avoid browser timeout when buffering $time_start = time(); + +/** + * Detect ob_gzhandler + * + * @return bool + */ +function PMA_isGzhandlerEnabled() +{ + return in_array('ob_gzhandler', ob_list_handlers()); +} + /** * Detect whether gzencode is needed; it might not be needed if * the server is already compressing by itself @@ -152,12 +163,14 @@ function PMA_gzencodeNeeded() // and therefore, will gzip encode the content && ! (function_exists('apache_get_modules') && in_array('mod_deflate', apache_get_modules())) - ) { + && ! PMA_isGzhandlerEnabled() + ) { return true; } else { return false; } } + /** * Output handler for all exports, if needed buffering, it stores data into * $dump_buffer, otherwise it prints thems out.