diff options
Diffstat (limited to 'import.php')
-rw-r--r-- | import.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/import.php b/import.php index 514389a5c4..82beb3f8ca 100644 --- a/import.php +++ b/import.php @@ -237,17 +237,17 @@ if ($import_type == 'table') { $goto = 'server_import.php'; } else { if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) { - if ($pmaString->strlen($table) && $pmaString->strlen($db)) { + if (/*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) { $goto = 'tbl_structure.php'; - } elseif ($pmaString->strlen($db)) { + } elseif (/*overload*/mb_strlen($db)) { $goto = 'db_structure.php'; } else { $goto = 'server_sql.php'; } } - if ($pmaString->strlen($table) && $pmaString->strlen($db)) { + if (/*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) { $common = PMA_URL_getCommon(array('db' => $db, 'table' => $table)); - } elseif ($pmaString->strlen($db)) { + } elseif (/*overload*/mb_strlen($db)) { $common = PMA_URL_getCommon(array('db' => $db)); } else { $common = PMA_URL_getCommon(); @@ -265,7 +265,7 @@ if (basename($_SERVER['SCRIPT_NAME']) === 'import.php') { } -if ($pmaString->strlen($db)) { +if (/*overload*/mb_strlen($db)) { $GLOBALS['dbi']->selectDb($db); } @@ -389,13 +389,13 @@ if ($memory_limit == -1) { } // Calculate value of the limit -if ($pmaString->strtolower($pmaString->substr($memory_limit, -1)) == 'm') { - $memory_limit = (int)$pmaString->substr($memory_limit, 0, -1) * 1024 * 1024; -} elseif ($pmaString->strtolower($pmaString->substr($memory_limit, -1)) == 'k') { - $memory_limit = (int)$pmaString->substr($memory_limit, 0, -1) * 1024; -} elseif ($pmaString->strtolower($pmaString->substr($memory_limit, -1)) == 'g') { - $memory_limit - = (int)$pmaString->substr($memory_limit, 0, -1) * 1024 * 1024 * 1024; +$memoryUnit = /*overload*/mb_strtolower(substr($memory_limit, -1)); +if ('m' == $memoryUnit) { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024; +} elseif ('k' == $memoryUnit) { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024; +} elseif ('g' == $memoryUnit) { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024 * 1024; } else { $memory_limit = (int)$memory_limit; } @@ -672,7 +672,7 @@ if (isset($message)) { // in case of a query typed in the query window // (but if the query is too large, in case of an imported file, the parser // can choke on it so avoid parsing) -if ($pmaString->strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] +if (/*overload*/mb_strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] ) { include_once 'libraries/parse_analyze.inc.php'; } |