Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
781b9fb0a3
@ -27,6 +27,7 @@ phpMyAdmin - ChangeLog
|
||||
- bug #4219 Table list (left panel) does not reload when table renamed
|
||||
- bug #4230 "in use" displayed for all views in database print view
|
||||
- bug #4226 Notice: Undefined index: pma_config_loading
|
||||
- bug #4221 Bzip2 export cannot be directly imported (so withdraw bz2 export)
|
||||
|
||||
4.1.4.0 (2014-01-07)
|
||||
- bug #3840 (additional fix) When exporting to gzip format, the data is compressed 2 times
|
||||
|
||||
12
doc/faq.rst
12
doc/faq.rst
@ -68,13 +68,13 @@ and :file:`index.php`.
|
||||
|
||||
.. _faq1_7:
|
||||
|
||||
1.7 How can I GZip or Bzip a dump or a CSV export? It does not seem to work.
|
||||
----------------------------------------------------------------------------
|
||||
1.7 How can I GZip a dump or a CSV export? It does not seem to work.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
These features are based on the ``gzencode()`` and ``bzcompress()``
|
||||
PHP functions to be more independent of the platform (Unix/Windows,
|
||||
Safe Mode or not, and so on). So, you must have Zlib/Bzip2 support
|
||||
(``--with-zlib`` and ``--with-bz2``).
|
||||
This feature is based on the ``gzencode()``
|
||||
PHP function to be more independent of the platform (Unix/Windows,
|
||||
Safe Mode or not, and so on). So, you must have Zlib support
|
||||
(``--with-zlib``).
|
||||
|
||||
.. _faq1_8:
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ be valid MySQL users.
|
||||
|
||||
.. [#f1]
|
||||
|
||||
phpMyAdmin can compress (:term:`Zip`, :term:`GZip` :term:`RFC 1952` or
|
||||
:term:`Bzip2` formats) dumps and :term:`CSV` exports if you use PHP with
|
||||
:term:`Zlib` support (``--with-zlib``) and/or :term:`Bzip2` support
|
||||
(``--with-bz2``). Proper support may also need changes in :file:`php.ini`.
|
||||
phpMyAdmin can compress (:term:`Zip`, :term:`GZip` or :term:`RFC 1952`
|
||||
formats) dumps and :term:`CSV` exports if you use PHP with
|
||||
:term:`Zlib` support (``--with-zlib``).
|
||||
Proper support may also need changes in :file:`php.ini`.
|
||||
|
||||
@ -177,8 +177,7 @@ if (!defined('TESTSUITE')) {
|
||||
*/
|
||||
$compression_methods = array(
|
||||
'zip',
|
||||
'gzip',
|
||||
'bzip2',
|
||||
'gzip'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -270,7 +269,7 @@ if (!defined('TESTSUITE')) {
|
||||
|
||||
// Use on the fly compression?
|
||||
$GLOBALS['onfly_compression'] = $GLOBALS['cfg']['CompressOnFly']
|
||||
&& ($compression == 'gzip' || $compression == 'bzip2');
|
||||
&& $compression == 'gzip';
|
||||
if ($GLOBALS['onfly_compression']) {
|
||||
$GLOBALS['memory_limit'] = PMA_getMemoryLimitForExport();
|
||||
}
|
||||
|
||||
@ -1177,15 +1177,15 @@ $cfg['ZipDump'] = true;
|
||||
$cfg['GZipDump'] = true;
|
||||
|
||||
/**
|
||||
* Allow for the use of bzip2 compression (requires bz2 extension)
|
||||
* Allow for the use of bzip2 decompression (requires bz2 extension)
|
||||
*
|
||||
* @global boolean $cfg['BZipDump']
|
||||
*/
|
||||
$cfg['BZipDump'] = true;
|
||||
|
||||
/**
|
||||
* Will compress gzip/bzip2 exports on the fly without the need for much memory.
|
||||
* If you encounter problems with created gzip/bzip2 files disable this feature.
|
||||
* Will compress gzip exports on the fly without the need for much memory.
|
||||
* If you encounter problems with created gzip files disable this feature.
|
||||
*
|
||||
* @global boolean $cfg['CompressOnFly']
|
||||
*/
|
||||
@ -1280,7 +1280,7 @@ $cfg['Export']['format'] = 'sql';
|
||||
$cfg['Export']['method'] = 'quick';
|
||||
|
||||
/**
|
||||
* none/zip/gzip/bzip2
|
||||
* none/zip/gzip
|
||||
*
|
||||
* @global string $cfg['Export']['compression']
|
||||
*/
|
||||
|
||||
@ -158,7 +158,7 @@ $cfg_db['Export']['format'] = array(
|
||||
'codegen', 'csv', 'excel', 'htmlexcel','htmlword', 'latex', 'ods',
|
||||
'odt', 'pdf', 'sql', 'texytext', 'xls', 'xml', 'yaml'
|
||||
);
|
||||
$cfg_db['Export']['compression'] = array('none', 'zip', 'gzip', 'bzip2');
|
||||
$cfg_db['Export']['compression'] = array('none', 'zip', 'gzip');
|
||||
$cfg_db['Export']['charset'] = array_merge(
|
||||
array(''),
|
||||
$GLOBALS['cfg']['AvailableCharsets']
|
||||
|
||||
@ -35,8 +35,8 @@ $strConfigBrowseMarkerEnable_name = __('Row marker');
|
||||
$strConfigBrowsePointerEnable_desc = __('Highlight row pointed by the mouse cursor.');
|
||||
$strConfigBrowsePointerEnable_name = __('Highlight pointer');
|
||||
$strConfigBZipDump_desc = __(
|
||||
'Enable [a@http://en.wikipedia.org/wiki/Bzip2]bzip2[/a] compression for import '
|
||||
. 'and export operations.'
|
||||
'Enable [a@http://en.wikipedia.org/wiki/Bzip2]bzip2[/a] compression for'
|
||||
. ' import operations.'
|
||||
);
|
||||
$strConfigBZipDump_name = __('Bzip2');
|
||||
$strConfigCharEditing_desc = __(
|
||||
@ -67,8 +67,8 @@ $strConfigCharTextareaRows_desc = __('Number of rows for CHAR/VARCHAR textareas.
|
||||
$strConfigCharTextareaRows_name = __('CHAR textarea rows');
|
||||
$strConfigCheckConfigurationPermissions_name = __('Check config file permissions');
|
||||
$strConfigCompressOnFly_desc = __(
|
||||
'Compress gzip/bzip2 exports on the fly without the need for much memory; if '
|
||||
. 'you encounter problems with created gzip/bzip2 files disable this feature.'
|
||||
'Compress gzip exports on the fly without the need for much memory; if '
|
||||
. 'you encounter problems with created gzip files disable this feature.'
|
||||
);
|
||||
$strConfigCompressOnFly_name = __('Compress on the fly');
|
||||
$strConfigConfigurationFile = __('Configuration file');
|
||||
|
||||
@ -560,11 +560,10 @@ function PMA_getHtmlForExportOptionsOutputCompression()
|
||||
}
|
||||
|
||||
$html = "";
|
||||
// zip, gzip and bzip2 encode features
|
||||
// zip and gzip encode features
|
||||
$is_zip = ($cfg['ZipDump'] && @function_exists('gzcompress'));
|
||||
$is_gzip = ($cfg['GZipDump'] && @function_exists('gzencode'));
|
||||
$is_bzip2 = ($cfg['BZipDump'] && @function_exists('bzcompress'));
|
||||
if ($is_zip || $is_gzip || $is_bzip2) {
|
||||
if ($is_zip || $is_gzip) {
|
||||
$html .= '<li>';
|
||||
$html .= '<label for="compression" class="desc">'
|
||||
. __('Compression:') . '</label>';
|
||||
@ -584,13 +583,6 @@ function PMA_getHtmlForExportOptionsOutputCompression()
|
||||
}
|
||||
$html .= '>' . __('gzipped') . '</option>';
|
||||
}
|
||||
if ($is_bzip2) {
|
||||
$html .= '<option value="bzip2" ';
|
||||
if ($selected_compression == "bzip2") {
|
||||
$html .= 'selected="selected"';
|
||||
}
|
||||
$html .= '>' . __('bzipped') . '</option>';
|
||||
}
|
||||
$html .= '</select>';
|
||||
$html .= '</li>';
|
||||
} else {
|
||||
|
||||
@ -99,12 +99,7 @@ function PMA_exportOutputHandler($line)
|
||||
$dump_buffer
|
||||
);
|
||||
}
|
||||
// as bzipped
|
||||
if ($GLOBALS['compression'] == 'bzip2'
|
||||
&& @function_exists('bzcompress')
|
||||
) {
|
||||
$dump_buffer = bzcompress($dump_buffer);
|
||||
} elseif ($GLOBALS['compression'] == 'gzip'
|
||||
if ($GLOBALS['compression'] == 'gzip'
|
||||
&& PMA_gzencodeNeeded()
|
||||
) {
|
||||
// as a gzipped file
|
||||
@ -290,10 +285,7 @@ function PMA_getExportFilenameAndMimetype(
|
||||
|
||||
// If dump is going to be compressed, set correct mime_type and add
|
||||
// compression to extension
|
||||
if ($compression == 'bzip2') {
|
||||
$filename .= '.bz2';
|
||||
$mime_type = 'application/x-bzip2';
|
||||
} elseif ($compression == 'gzip') {
|
||||
if ($compression == 'gzip') {
|
||||
$filename .= '.gz';
|
||||
$mime_type = 'application/x-gzip';
|
||||
} elseif ($compression == 'zip') {
|
||||
@ -397,8 +389,6 @@ function PMA_compressExport($dump_buffer, $compression)
|
||||
$zipfile = new ZipFile();
|
||||
$zipfile->addFile($dump_buffer, substr($filename, 0, -4));
|
||||
$dump_buffer = $zipfile->file();
|
||||
} elseif ($compression == 'bzip2' && @function_exists('bzcompress')) {
|
||||
$dump_buffer = bzcompress($dump_buffer);
|
||||
} elseif ($compression == 'gzip' && PMA_gzencodeNeeded()) {
|
||||
// without the optional parameter level because it bugs
|
||||
$dump_buffer = gzencode($dump_buffer);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user