bug #3426031 [export] Export to bzip2 is not working
This commit is contained in:
@@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog
|
|||||||
- bug #3423725 [pdf] Broken PDF file when exporting database to PDF
|
- bug #3423725 [pdf] Broken PDF file when exporting database to PDF
|
||||||
- [core] Allow to set language in URL
|
- [core] Allow to set language in URL
|
||||||
- bug #3425184 [doc] Fix links to PHP documentation
|
- bug #3425184 [doc] Fix links to PHP documentation
|
||||||
|
- bug #3426031 [export] Export to bzip2 is not working
|
||||||
|
|
||||||
3.4.6.0 (2011-10-16)
|
3.4.6.0 (2011-10-16)
|
||||||
- patch #3404173 InnoDB comment display with tooltips/aliases
|
- patch #3404173 InnoDB comment display with tooltips/aliases
|
||||||
|
10
export.php
10
export.php
@@ -31,7 +31,7 @@ if (!isset($export_list[$type])) {
|
|||||||
$compression_methods = array(
|
$compression_methods = array(
|
||||||
'zip',
|
'zip',
|
||||||
'gzip',
|
'gzip',
|
||||||
'bzip',
|
'bzip2',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -150,7 +150,7 @@ function PMA_exportOutputHandler($line)
|
|||||||
$dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer);
|
$dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer);
|
||||||
}
|
}
|
||||||
// as bzipped
|
// as bzipped
|
||||||
if ($GLOBALS['compression'] == 'bzip' && @function_exists('bzcompress')) {
|
if ($GLOBALS['compression'] == 'bzip2' && @function_exists('bzcompress')) {
|
||||||
$dump_buffer = bzcompress($dump_buffer);
|
$dump_buffer = bzcompress($dump_buffer);
|
||||||
}
|
}
|
||||||
// as a gzipped file
|
// as a gzipped file
|
||||||
@@ -222,7 +222,7 @@ $output_charset_conversion = $asfile && $GLOBALS['PMA_recoding_engine'] != PMA_C
|
|||||||
&& $type != 'xls';
|
&& $type != 'xls';
|
||||||
|
|
||||||
// Use on the fly compression?
|
// 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) {
|
if ($onfly_compression) {
|
||||||
$memory_limit = trim(@ini_get('memory_limit'));
|
$memory_limit = trim(@ini_get('memory_limit'));
|
||||||
// 2 MB as default
|
// 2 MB as default
|
||||||
@@ -285,7 +285,7 @@ if ($asfile) {
|
|||||||
|
|
||||||
// If dump is going to be compressed, set correct mime_type and add
|
// If dump is going to be compressed, set correct mime_type and add
|
||||||
// compression to extension
|
// compression to extension
|
||||||
if ($compression == 'bzip') {
|
if ($compression == 'bzip2') {
|
||||||
$filename .= '.bz2';
|
$filename .= '.bz2';
|
||||||
$mime_type = 'application/x-bzip2';
|
$mime_type = 'application/x-bzip2';
|
||||||
} elseif ($compression == 'gzip') {
|
} elseif ($compression == 'gzip') {
|
||||||
@@ -649,7 +649,7 @@ if (!empty($asfile)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 2. as a bzipped file
|
// 2. as a bzipped file
|
||||||
elseif ($compression == 'bzip') {
|
elseif ($compression == 'bzip2') {
|
||||||
if (@function_exists('bzcompress')) {
|
if (@function_exists('bzcompress')) {
|
||||||
$dump_buffer = bzcompress($dump_buffer);
|
$dump_buffer = bzcompress($dump_buffer);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user