Replace mb functions by standard string functions.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2014-10-04 10:09:06 +02:00
parent e20510de39
commit 49ababac08
7 changed files with 17 additions and 17 deletions

View File

@ -23,7 +23,7 @@ $filename = CHANGELOG_FILE;
if (is_readable($filename)) {
// Test if the if is in a compressed format
if (/*overload*/mb_substr($filename, -3) == '.gz') {
if (substr($filename, -3) == '.gz') {
ob_start();
readgzfile($filename);
$changelog = ob_get_contents();

View File

@ -50,7 +50,7 @@ if (! isset($gis_data['gis_type'])) {
$gis_data['gis_type'] = /*overload*/mb_strtoupper($_REQUEST['type']);
}
if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') {
$start = (/*overload*/mb_substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
$start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
$gis_data['gis_type'] = /*overload*/mb_substr(
$_REQUEST['value'],
$start,

View File

@ -392,13 +392,13 @@ if ($memory_limit == -1) {
}
// Calculate value of the limit
if (/*overload*/mb_strtolower(/*overload*/mb_substr($memory_limit, -1)) == 'm') {
$memory_limit = (int)/*overload*/mb_substr($memory_limit, 0, -1) * 1024 * 1024;
} elseif (/*overload*/mb_strtolower(/*overload*/mb_substr($memory_limit, -1)) == 'k') {
$memory_limit = (int)/*overload*/mb_substr($memory_limit, 0, -1) * 1024;
} elseif (/*overload*/mb_strtolower(/*overload*/mb_substr($memory_limit, -1)) == 'g') {
$memory_limit
= (int)/*overload*/mb_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;
}

View File

@ -563,7 +563,7 @@ if (isset($GLOBALS['dbi'])
$_client_info = $GLOBALS['dbi']->getClientInfo();
if ($server > 0
&& /*overload*/mb_strpos($_client_info, 'mysqlnd') === false
&& substr(PMA_MYSQL_CLIENT_API, 0, 3) != mb_substr(
&& substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(
PMA_MYSQL_INT_VERSION, 0, 3
)
) {

View File

@ -389,7 +389,7 @@ class Advisor
}
// Reading new rule
if (/*overload*/mb_substr($line, 0, 4) == 'rule') {
if (substr($line, 0, 4) == 'rule') {
if ($ruleLine > 0) {
$errors[] = sprintf(
__(

View File

@ -437,7 +437,7 @@ class PMA_Config
//@TODO Implement strstr in PMA_String
if (/*overload*/mb_strstr($ref_head, '/')) {
$ref_head = /*overload*/mb_substr(trim($ref_head), 5);
if (/*overload*/mb_substr($ref_head, 0, 11) === 'refs/heads/') {
if (substr($ref_head, 0, 11) === 'refs/heads/') {
$branch = /*overload*/mb_substr($ref_head, 11);
} else {
$branch = basename($ref_head);
@ -507,7 +507,7 @@ class PMA_Config
// packs. (to look for them in .git/object/pack directory later)
foreach (explode("\n", $packs) as $line) {
// skip blank lines
if (/*overload*/mb_strlen(trim($line)) == 0) {
if (strlen(trim($line)) == 0) {
continue;
}
// skip non pack lines
@ -530,7 +530,7 @@ class PMA_Config
$file_name = $file_info->getFilename();
// if this is a .pack file
if ($file_info->isFile()
&& /*overload*/mb_substr($file_name, -5) == '.pack'
&& substr($file_name, -5) == '.pack'
) {
$pack_names[] = $file_name;
}
@ -782,7 +782,7 @@ class PMA_Config
$httpOk = 'HTTP/1.1 200 OK';
$httpNotFound = 'HTTP/1.1 404 Not Found';
if (/*overload*/mb_substr($data, 0, strlen($httpOk)) === $httpOk) {
if (substr($data, 0, strlen($httpOk)) === $httpOk) {
return $get_body
? /*overload*/mb_substr(
$data,
@ -791,7 +791,7 @@ class PMA_Config
: true;
}
$httpNOK = /*overload*/mb_substr(
$httpNOK = substr(
$data,
0,
strlen($httpNotFound)

View File

@ -77,7 +77,7 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework']) {
);
foreach ($mime_options as $key => $option) {
if (/*overload*/mb_substr($option, 0, 10) == '; charset=') {
if (substr($option, 0, 10) == '; charset=') {
$mime_options['charset'] = $option;
}
}