From ec99ab3e0084e61623f5343dc82296cc0cd5fe3b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 19 Oct 2011 13:11:22 -0400 Subject: [PATCH] bug #3426031 [export] Export to bzip2 is not working --- ChangeLog | 1 + export.php | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b61d592c..04455a7da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog - bug #3423725 [pdf] Broken PDF file when exporting database to PDF - [core] Allow to set language in URL - bug #3425184 [doc] Fix links to PHP documentation +- bug #3426031 [export] Export to bzip2 is not working 3.4.6.0 (2011-10-16) - patch #3404173 InnoDB comment display with tooltips/aliases diff --git a/export.php b/export.php index fb8805a4e..fa8e15ad9 100644 --- a/export.php +++ b/export.php @@ -31,7 +31,7 @@ if (!isset($export_list[$type])) { $compression_methods = array( 'zip', 'gzip', - 'bzip', + 'bzip2', ); /** @@ -150,7 +150,7 @@ function PMA_exportOutputHandler($line) $dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer); } // as bzipped - if ($GLOBALS['compression'] == 'bzip' && @function_exists('bzcompress')) { + if ($GLOBALS['compression'] == 'bzip2' && @function_exists('bzcompress')) { $dump_buffer = bzcompress($dump_buffer); } // as a gzipped file @@ -222,7 +222,7 @@ $output_charset_conversion = $asfile && $GLOBALS['PMA_recoding_engine'] != PMA_C && $type != 'xls'; // Use on the fly compression? -$onfly_compression = $GLOBALS['cfg']['CompressOnFly'] && ($compression == 'gzip' || $compression == 'bzip'); +$onfly_compression = $GLOBALS['cfg']['CompressOnFly'] && ($compression == 'gzip' || $compression == 'bzip2'); if ($onfly_compression) { $memory_limit = trim(@ini_get('memory_limit')); // 2 MB as default @@ -285,7 +285,7 @@ if ($asfile) { // If dump is going to be compressed, set correct mime_type and add // compression to extension - if ($compression == 'bzip') { + if ($compression == 'bzip2') { $filename .= '.bz2'; $mime_type = 'application/x-bzip2'; } elseif ($compression == 'gzip') { @@ -649,7 +649,7 @@ if (!empty($asfile)) { } } // 2. as a bzipped file - elseif ($compression == 'bzip') { + elseif ($compression == 'bzip2') { if (@function_exists('bzcompress')) { $dump_buffer = bzcompress($dump_buffer); }