From a4055b4773909e84cb727d269de0ebb6ac05c1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 20 Jul 2010 11:56:21 +0200 Subject: [PATCH] [core] RecodingEngine now accepts none as valid option. --- ChangeLog | 1 + Documentation.html | 1 + libraries/charset_conversion.lib.php | 6 ++++-- libraries/config.default.php | 1 + setup/lib/config_info.inc.php | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42404637d..7acf06212 100644 --- a/ChangeLog +++ b/ChangeLog @@ -87,6 +87,7 @@ $Id$ thanks to Piotr Przybylski - crackpl - bug [password] Generate password only available if JS is enabled (fixed for Privileges and Change password) +- [core] RecodingEngine now accepts none as valid option. 3.3.6.0 (not yet released) diff --git a/Documentation.html b/Documentation.html index 63705ca4c..d6e2b6fdf 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1702,6 +1702,7 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE iconv, then recode)
  • iconv - use iconv or libiconv functions
  • recode - use recode_string function
  • +
  • none - disable encoding conversion
  • Default is auto. diff --git a/libraries/charset_conversion.lib.php b/libraries/charset_conversion.lib.php index ed44a6493..222b4f3d8 100644 --- a/libraries/charset_conversion.lib.php +++ b/libraries/charset_conversion.lib.php @@ -33,14 +33,16 @@ if (isset($cfg['AllowAnywhereRecoding']) PMA_failRecoding(); } $PMA_recoding_engine = 'iconv'; - } else { + } elseif ($cfg['RecodingEngine'] == 'auto') { if (@extension_loaded('iconv')) { $PMA_recoding_engine = 'iconv'; } elseif (@extension_loaded('recode')) { $PMA_recoding_engine = 'recode'; } else { - PMA_failRecoding(); + $PMA_recoding_engine = 'none'; } + } else { + $PMA_recoding_engine = 'none'; } } // end load recode/iconv extension diff --git a/libraries/config.default.php b/libraries/config.default.php index 7d7d0844b..73e241ee4 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -1967,6 +1967,7 @@ $cfg['AllowAnywhereRecoding'] = false; * recode) * iconv - use iconv or libiconv functions * recode - use recode_string function + * none - disable encoding conversion * * @global string $cfg['RecodingEngine'] */ diff --git a/setup/lib/config_info.inc.php b/setup/lib/config_info.inc.php index 3d95641c7..afc124ac6 100644 --- a/setup/lib/config_info.inc.php +++ b/setup/lib/config_info.inc.php @@ -40,7 +40,7 @@ $cfg_db['Servers'] = array(1 => array( 'AllowDeny' => array( 'order' => array('', 'deny,allow', 'allow,deny', 'explicit')), 'only_db' => 'array')); -$cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode'); +$cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'none'); $cfg_db['OBGzip'] = array('auto', true, false); $cfg_db['ShowTooltipAliasTB'] = array('nested', true, false); $cfg_db['DisplayDatabasesList'] = array('auto', true, false);