old PHP4 code

This commit is contained in:
Marc Delisle
2007-08-18 20:33:30 +00:00
parent d25f96a383
commit 0effdcaa31
3 changed files with 17 additions and 24 deletions

View File

@@ -57,12 +57,10 @@ function PMA_DBI_connect($user, $password, $is_controluser = FALSE) {
$client_flags = 0;
if (PMA_PHP_INT_VERSION >= 40300 && PMA_MYSQL_CLIENT_API >= 32349) {
// always use CLIENT_LOCAL_FILES as defined in mysql_com.h
// for the case where the client library was not compiled
// with --enable-local-infile
$client_flags |= 128;
}
// always use CLIENT_LOCAL_FILES as defined in mysql_com.h
// for the case where the client library was not compiled
// with --enable-local-infile
$client_flags |= 128;
/* Optionally compress connection */
if (defined('MYSQL_CLIENT_COMPRESS') && $cfg['Server']['compress']) {

View File

@@ -455,21 +455,19 @@ if (! defined('PMA_MINIMUM_COMMON')) {
*/
// Nijel: Fast skip is especially needed for huge BLOB data, requires PHP at least 4.3.0:
if (PMA_PHP_INT_VERSION >= 40300) {
if ($is_hex_digit) {
$count2++;
$pos = strspn($sql, '0123456789abcdefABCDEF', $count2);
if ($pos > $count2) {
$count2 = $pos;
}
unset($pos);
} elseif ($is_digit) {
$pos = strspn($sql, '0123456789', $count2);
if ($pos > $count2) {
$count2 = $pos;
}
unset($pos);
if ($is_hex_digit) {
$count2++;
$pos = strspn($sql, '0123456789abcdefABCDEF', $count2);
if ($pos > $count2) {
$count2 = $pos;
}
unset($pos);
} elseif ($is_digit) {
$pos = strspn($sql, '0123456789', $count2);
if ($pos > $count2) {
$count2 = $pos;
}
unset($pos);
}
while (($count2 < $len) && PMA_STR_isSqlIdentifier(PMA_substr($sql, $count2, 1), ($is_sql_variable || $is_digit))) {

View File

@@ -13,7 +13,6 @@
* The SQL Parser code relies heavily on these functions.
*
* @version $Id$
* @uses PMA_PHP_INT_VERSION
* @uses PMA_dl()
* @uses extension_loaded()
* @uses substr()
@@ -23,12 +22,10 @@
* @todo a .lib filename should not have code in main(), split or rename file
*/
/* Try to load mbstring, unless we're using buggy php version */
if (PMA_PHP_INT_VERSION != 40203) {
/* Try to load mbstring */
if (!@extension_loaded('mbstring')) {
PMA_dl('mbstring');
}
}
/**
* windows-* and tis-620 are not supported and are not multibyte,