From 685c1d3495347e37615b892ace83fd2339408696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Thomsen?= Date: Wed, 1 Jan 2014 06:18:19 -0500 Subject: [PATCH 1/2] bug #4209 Missing compression in one case Signed-off-by: Marc Delisle --- export.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/export.php b/export.php index bd6f9d687f..c65dc91fef 100644 --- a/export.php +++ b/export.php @@ -301,8 +301,9 @@ function PMA_isGzHandlerEnabled() function PMA_gzencodeNeeded() { if (@function_exists('gzencode') - && ! @ini_get('zlib.output_compression') - && ! PMA_isGzHandlerEnabled() + && ((! @ini_get('zlib.output_compression') + && ! PMA_isGzHandlerEnabled()) + || $GLOBALS['save_on_server']) ) { return true; } else { From 69c24b78bb2d7d50a1d205f7ad13468e95d067d8 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 1 Jan 2014 06:19:39 -0500 Subject: [PATCH 2/2] ChangeLog entry and fix explanation for bug #4209 Signed-off-by: Marc Delisle --- ChangeLog | 1 + export.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index f32c68caac..3d7365cbc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 4.1.4.0 (not yet released) - bug #3840 (additional fix) When exporting to gzip format, the data is compressed 2 times +- bug #4209 Missing compression in one case 4.1.3.0 (2013-12-31) - bug #3938 PDFDefaultPageSize doc and easy configurability diff --git a/export.php b/export.php index c65dc91fef..18aae1c92f 100644 --- a/export.php +++ b/export.php @@ -300,6 +300,13 @@ function PMA_isGzHandlerEnabled() */ function PMA_gzencodeNeeded() { + /* + * We should gzencode only if the function exists + * but we don't want to compress twice, therefore + * gzencode only if transparent compression is not enabled + * and gz compression was not asked via $cfg['OBGzip'] + * but transparent compression does not apply when saving to server + */ if (@function_exists('gzencode') && ((! @ini_get('zlib.output_compression') && ! PMA_isGzHandlerEnabled())