diff --git a/ChangeLog b/ChangeLog index 90ee3b017..6881ec3f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - rfe #1688975 [display] enable copying of auto increment by default - bug #2355753 [core] do not bail out creating session on any PHP warning - bug #2355925 [display] properly update tooltips in navigation frame +- bug #2355923 [core] do not use ctype if it is not available 3.1.0.0 (2008-11-28) + [auth] Support for Swekey hardware authentication, diff --git a/Documentation.html b/Documentation.html index 8be832c55..2bb18ace8 100644 --- a/Documentation.html +++ b/Documentation.html @@ -62,6 +62,10 @@ and the Standard PHP Library (SPL) extension.
  • To support uploading of ZIP files, you need the PHP zip extension.
  • +
  • For proper support of multibyte strings (eg. UTF-8, which is + currently default), you should install mbstring and ctype + extensions. +
  • You need GD2 support in PHP to display inline thumbnails of JPEGs ("image/jpeg: inline") with their original aspect ratio
  • diff --git a/libraries/string.lib.php b/libraries/string.lib.php index 6cb2d60e1..c6225a061 100644 --- a/libraries/string.lib.php +++ b/libraries/string.lib.php @@ -25,6 +25,7 @@ if (! defined('PHPMYADMIN')) { } $GLOBALS['PMA_allow_mbstr'] = @function_exists('mb_strlen'); +$GLOBALS['PMA_allow_ctype'] = @extension_loaded('ctype'); if ($GLOBALS['PMA_allow_mbstr']) { mb_internal_encoding($GLOBALS['charset']); @@ -34,22 +35,22 @@ if ($GLOBALS['PMA_allow_mbstr']) { if (defined('PMA_MULTIBYTE_ENCODING') || $GLOBALS['PMA_allow_mbstr']) { $GLOBALS['PMA_strpos'] = 'mb_strpos'; $GLOBALS['PMA_substr'] = 'mb_substr'; - $GLOBALS['PMA_STR_isAlnum'] = 'ctype_alnum'; - $GLOBALS['PMA_STR_isDigit'] = 'ctype_digit'; - $GLOBALS['PMA_STR_isSpace'] = 'ctype_space'; require './libraries/string_mb.lib.php'; } else { $GLOBALS['PMA_strpos'] = 'strpos'; $GLOBALS['PMA_substr'] = 'substr'; - $GLOBALS['PMA_STR_isAlnum'] = 'PMA_STR_isAlnum'; - $GLOBALS['PMA_STR_isDigit'] = 'PMA_STR_isDigit'; - $GLOBALS['PMA_STR_isSpace'] = 'PMA_STR_isSpace'; require './libraries/string_native.lib.php'; } -if (@extension_loaded('ctype')) { +if ($GLOBALS['PMA_allow_ctype']) { + $GLOBALS['PMA_STR_isAlnum'] = 'ctype_alnum'; + $GLOBALS['PMA_STR_isDigit'] = 'ctype_digit'; + $GLOBALS['PMA_STR_isSpace'] = 'ctype_space'; require './libraries/string_type_ctype.lib.php'; } else { + $GLOBALS['PMA_STR_isAlnum'] = 'PMA_STR_isAlnum'; + $GLOBALS['PMA_STR_isDigit'] = 'PMA_STR_isDigit'; + $GLOBALS['PMA_STR_isSpace'] = 'PMA_STR_isSpace'; require './libraries/string_type_native.lib.php'; }