Merge remote-tracking branch 'origin/QA_4_1' into QA_4_1
This commit is contained in:
commit
d9a31a86c5
@ -9,6 +9,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`.
|
||||
|
||||
22
export.php
22
export.php
@ -176,8 +176,7 @@ if (!defined('TESTSUITE')) {
|
||||
*/
|
||||
$compression_methods = array(
|
||||
'zip',
|
||||
'gzip',
|
||||
'bzip2',
|
||||
'gzip'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -354,12 +353,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
|
||||
@ -443,7 +437,7 @@ if (!defined('TESTSUITE')) {
|
||||
|
||||
// Use on the fly compression?
|
||||
$onfly_compression = $GLOBALS['cfg']['CompressOnFly']
|
||||
&& ($compression == 'gzip' || $compression == 'bzip2');
|
||||
&& $compression == 'gzip';
|
||||
if ($onfly_compression) {
|
||||
$memory_limit = trim(@ini_get('memory_limit'));
|
||||
$memory_limit_num = (int)substr($memory_limit, 0, -1);
|
||||
@ -519,10 +513,7 @@ if (!defined('TESTSUITE')) {
|
||||
|
||||
// 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') {
|
||||
@ -969,11 +960,6 @@ if (!defined('TESTSUITE')) {
|
||||
$zipfile->addFile($dump_buffer, substr($filename, 0, -4));
|
||||
$dump_buffer = $zipfile->file();
|
||||
}
|
||||
} elseif ($compression == 'bzip2') {
|
||||
// 2. as a bzipped file
|
||||
if (@function_exists('bzcompress')) {
|
||||
$dump_buffer = bzcompress($dump_buffer);
|
||||
}
|
||||
} elseif ($compression == 'gzip' && PMA_gzencodeNeeded()) {
|
||||
// 3. as a gzipped file
|
||||
// without the optional parameter level because it bugs
|
||||
|
||||
@ -1184,15 +1184,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']
|
||||
*/
|
||||
@ -1281,7 +1281,7 @@ $cfg['Export']['format'] = 'sql';
|
||||
$cfg['Export']['method'] = 'quick';
|
||||
|
||||
/**
|
||||
* none/zip/gzip/bzip2
|
||||
* none/zip/gzip
|
||||
*
|
||||
* @global string $cfg['Export']['compression']
|
||||
*/
|
||||
|
||||
@ -159,7 +159,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']
|
||||
|
||||
@ -25,7 +25,7 @@ $strConfigBrowseMarkerEnable_desc = __('Highlight selected rows');
|
||||
$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');
|
||||
$strConfigBZipDump_desc = __('Enable [a@http://en.wikipedia.org/wiki/Bzip2]bzip2[/a] compression for import operations');
|
||||
$strConfigBZipDump_name = __('Bzip2');
|
||||
$strConfigCharEditing_desc = __('Defines which type of editing controls should be used for CHAR and VARCHAR columns; [kbd]input[/kbd] - allows limiting of input length, [kbd]textarea[/kbd] - allows newlines in columns');
|
||||
$strConfigCharEditing_name = __('CHAR columns editing');
|
||||
@ -40,7 +40,7 @@ $strConfigCharTextareaCols_name = __('CHAR textarea columns');
|
||||
$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');
|
||||
$strConfigCompressOnFly_desc = __('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');
|
||||
$strConfigConfirm_desc = __('Whether a warning ("Are your really sure…") should be displayed when you\'re about to lose data');
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user