bug #2355923 [core] do not use ctype if it is not available

This commit is contained in:
Michal Čihař
2008-11-28 14:47:09 +00:00
parent 77a11d0283
commit 51e151271b
3 changed files with 13 additions and 7 deletions

View File

@@ -16,6 +16,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,

View File

@@ -69,6 +69,10 @@
and the Standard PHP Library (SPL) extension.
</li>
<li>To support uploading of ZIP files, you need the PHP <tt>zip</tt> extension.</li>
<li>For proper support of multibyte strings (eg. UTF-8, which is
currently default), you should install mbstring and ctype
extensions.
</li>
<li>You need GD2 support in PHP to display inline
thumbnails of JPEGs (&quot;image/jpeg: inline&quot;) with their
original aspect ratio</li>

View File

@@ -26,6 +26,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']);
@@ -37,25 +38,25 @@ 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';
}
/**
* Load ctype handler.
*/
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';
}