Merge pull request #11768 from nijel/overload

Remove /*overload*/ prefix from mb_* calls
This commit is contained in:
Michal Čihař 2016-01-04 16:57:06 +01:00
commit 66234c4521
140 changed files with 894 additions and 966 deletions

View File

@ -37,7 +37,7 @@ $sql_query = '';
/**
* Rename/move or copy database
*/
if (/*overload*/mb_strlen($GLOBALS['db'])
if (mb_strlen($GLOBALS['db'])
&& (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_copy']))
) {
if (! empty($_REQUEST['db_rename'])) {
@ -47,7 +47,7 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
}
if (! isset($_REQUEST['newname'])
|| ! /*overload*/mb_strlen($_REQUEST['newname'])
|| ! mb_strlen($_REQUEST['newname'])
) {
$message = PMA\libraries\Message::error(__('The database name is empty!'));
} else {

View File

@ -79,7 +79,7 @@ $base .= '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
$realm = $base . '/';
$returnTo = $base . dirname($_SERVER['PHP_SELF']);
if ($returnTo[/*overload*/mb_strlen($returnTo) - 1] != '/') {
if ($returnTo[mb_strlen($returnTo) - 1] != '/') {
$returnTo .= '/';
}
$returnTo .= 'openid.php';

View File

@ -254,7 +254,7 @@ if (!defined('TESTSUITE')) {
if ($export_type == 'server') {
$err_url = 'server_export.php' . PMA_URL_getCommon();
} elseif ($export_type == 'database'
&& /*overload*/mb_strlen($db)
&& mb_strlen($db)
) {
$err_url = 'db_export.php' . PMA_URL_getCommon(array('db' => $db));
// Check if we have something to export
@ -263,8 +263,8 @@ if (!defined('TESTSUITE')) {
} else {
$tables = array();
}
} elseif ($export_type == 'table' && /*overload*/mb_strlen($db)
&& /*overload*/mb_strlen($table)
} elseif ($export_type == 'table' && mb_strlen($db)
&& mb_strlen($table)
) {
$err_url = 'tbl_export.php' . PMA_URL_getCommon(
array(

View File

@ -43,9 +43,9 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) {
/* Decode data */
if ($extension != 'svg') {
$data = /*overload*/mb_substr(
$data = mb_substr(
$_REQUEST['image'],
/*overload*/mb_strpos($_REQUEST['image'], ',') + 1
mb_strpos($_REQUEST['image'], ',') + 1
);
$data = base64_decode($data);
} else {
@ -56,7 +56,7 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) {
PMA_downloadHeader(
$filename,
$_REQUEST['type'],
/*overload*/mb_strlen($data)
mb_strlen($data)
);
/* Send data */

View File

@ -43,14 +43,14 @@ $gis_types = array(
// Extract from field's values if available, if not use the column type passed.
if (! isset($gis_data['gis_type'])) {
if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') {
$gis_data['gis_type'] = /*overload*/mb_strtoupper($_REQUEST['type']);
$gis_data['gis_type'] = mb_strtoupper($_REQUEST['type']);
}
if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') {
$start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
$gis_data['gis_type'] = /*overload*/mb_substr(
$gis_data['gis_type'] = mb_substr(
$_REQUEST['value'],
$start,
/*overload*/mb_strpos($_REQUEST['value'], "(") - $start
mb_strpos($_REQUEST['value'], "(") - $start
);
}
if ((! isset($gis_data['gis_type']))

View File

@ -257,17 +257,17 @@ if ($import_type == 'table') {
$goto = 'server_import.php';
} else {
if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) {
if (/*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) {
if (mb_strlen($table) && mb_strlen($db)) {
$goto = 'tbl_structure.php';
} elseif (/*overload*/mb_strlen($db)) {
} elseif (mb_strlen($db)) {
$goto = 'db_structure.php';
} else {
$goto = 'server_sql.php';
}
}
if (/*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) {
if (mb_strlen($table) && mb_strlen($db)) {
$common = PMA_URL_getCommon(array('db' => $db, 'table' => $table));
} elseif (/*overload*/mb_strlen($db)) {
} elseif (mb_strlen($db)) {
$common = PMA_URL_getCommon(array('db' => $db));
} else {
$common = PMA_URL_getCommon();
@ -285,7 +285,7 @@ if (basename($_SERVER['SCRIPT_NAME']) === 'import.php') {
}
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$GLOBALS['dbi']->selectDb($db);
}
@ -407,7 +407,7 @@ if ($memory_limit == -1) {
}
// Calculate value of the limit
$memoryUnit = /*overload*/mb_strtolower(substr($memory_limit, -1));
$memoryUnit = mb_strtolower(substr($memory_limit, -1));
if ('m' == $memoryUnit) {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;
} elseif ('k' == $memoryUnit) {
@ -729,7 +729,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)
$sqlLength = /*overload*/mb_strlen($sql_query);
$sqlLength = mb_strlen($sql_query);
if ($sqlLength <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
include_once 'libraries/parse_analyze.lib.php';

View File

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

View File

@ -529,7 +529,7 @@ class Advisor
continue;
}
$rules[$ruleNo][$ruleSyntax[$ruleLine]] = chop(
/*overload*/mb_substr($line, 1)
mb_substr($line, 1)
);
$lines[$ruleNo][$ruleSyntax[$ruleLine]] = $i + 1;
++$ruleLine;

View File

@ -168,15 +168,15 @@ class Config
*/
private function _setClientPlatform($user_agent)
{
if (/*overload*/mb_strstr($user_agent, 'Win')) {
if (mb_strstr($user_agent, 'Win')) {
$this->set('PMA_USR_OS', 'Win');
} elseif (/*overload*/mb_strstr($user_agent, 'Mac')) {
} elseif (mb_strstr($user_agent, 'Mac')) {
$this->set('PMA_USR_OS', 'Mac');
} elseif (/*overload*/mb_strstr($user_agent, 'Linux')) {
} elseif (mb_strstr($user_agent, 'Linux')) {
$this->set('PMA_USR_OS', 'Linux');
} elseif (/*overload*/mb_strstr($user_agent, 'Unix')) {
} elseif (mb_strstr($user_agent, 'Unix')) {
$this->set('PMA_USR_OS', 'Unix');
} elseif (/*overload*/mb_strstr($user_agent, 'OS/2')) {
} elseif (mb_strstr($user_agent, 'OS/2')) {
$this->set('PMA_USR_OS', 'OS/2');
} else {
$this->set('PMA_USR_OS', 'Other');
@ -271,7 +271,7 @@ class Config
);
$this->set('PMA_USR_BROWSER_AGENT', 'SAFARI');
// Firefox
} elseif (! /*overload*/mb_strstr($HTTP_USER_AGENT, 'compatible')
} elseif (! mb_strstr($HTTP_USER_AGENT, 'compatible')
&& preg_match('@Firefox/([\w.]+)@', $HTTP_USER_AGENT, $log_version)
) {
$this->set(
@ -314,7 +314,7 @@ class Config
if (@function_exists('gd_info')) {
$gd_nfo = gd_info();
if (/*overload*/mb_strstr($gd_nfo["GD Version"], '2.')) {
if (mb_strstr($gd_nfo["GD Version"], '2.')) {
$this->set('PMA_IS_GD2', 1);
} else {
$this->set('PMA_IS_GD2', 0);
@ -449,10 +449,10 @@ class Config
$branch = false;
// are we on any branch?
if (/*overload*/mb_strstr($ref_head, '/')) {
$ref_head = /*overload*/mb_substr(trim($ref_head), 5);
if (mb_strstr($ref_head, '/')) {
$ref_head = mb_substr(trim($ref_head), 5);
if (substr($ref_head, 0, 11) === 'refs/heads/') {
$branch = /*overload*/mb_substr($ref_head, 11);
$branch = mb_substr($ref_head, 11);
} else {
$branch = basename($ref_head);
}
@ -1306,7 +1306,7 @@ class Config
$pma_absolute_uri = $this->get('PmaAbsoluteUri');
$is_https = $this->detectHttps();
if (/*overload*/mb_strlen($pma_absolute_uri) < 5) {
if (mb_strlen($pma_absolute_uri) < 5) {
$url = array();
// If we don't have scheme, we didn't have full URL so we need to
@ -1407,7 +1407,7 @@ class Config
$path = '';
}
// in vhost situations, there could be already an ending slash
if (/*overload*/mb_substr($path, -1) != '/') {
if (mb_substr($path, -1) != '/') {
$path .= '/';
}
$pma_absolute_uri .= $path;
@ -1429,20 +1429,20 @@ class Config
// Adds a trailing slash et the end of the phpMyAdmin uri if it
// does not exist.
if (/*overload*/mb_substr($pma_absolute_uri, -1) != '/') {
if (mb_substr($pma_absolute_uri, -1) != '/') {
$pma_absolute_uri .= '/';
}
// If URI doesn't start with http:// or https://, we will add
// this.
if (/*overload*/mb_substr($pma_absolute_uri, 0, 7) != 'http://'
&& /*overload*/mb_substr($pma_absolute_uri, 0, 8) != 'https://'
if (mb_substr($pma_absolute_uri, 0, 7) != 'http://'
&& mb_substr($pma_absolute_uri, 0, 8) != 'https://'
) {
$pma_absolute_uri
= ($is_https ? 'https' : 'http')
. ':'
. (
/*overload*/mb_substr($pma_absolute_uri, 0, 2) == '//'
mb_substr($pma_absolute_uri, 0, 2) == '//'
? ''
: '//'
)
@ -1588,7 +1588,7 @@ class Config
// CloudFlare Flexible SSL compatibility
$this->set('force_protocol', in_array(PMA_getenv('HTTP_X_FORWARDED_PROTO'), array('http', 'https'), true));
$is_https = $this->get('force_protocol') ? PMA_getenv('HTTP_X_FORWARDED_PROTO') : isset($url['scheme']) && $url['scheme'] == 'https';
$this->set('is_https', $is_https);
@ -1864,7 +1864,7 @@ class Config
public function setCookie($cookie, $value, $default = null,
$validity = null, $httponly = true
) {
if (/*overload*/mb_strlen($value) && null !== $default && $value === $default
if (mb_strlen($value) && null !== $default && $value === $default
) {
// default value is used
if (isset($_COOKIE[$cookie])) {
@ -1874,7 +1874,7 @@ class Config
return false;
}
if (!/*overload*/mb_strlen($value) && isset($_COOKIE[$cookie])) {
if (!mb_strlen($value) && isset($_COOKIE[$cookie])) {
// remove cookie, value is empty
return $this->removeCookie($cookie);
}

View File

@ -680,14 +680,14 @@ class DatabaseInterface
return $tables[$database];
}
if (isset($tables[/*overload*/mb_strtolower($database)])) {
if (isset($tables[mb_strtolower($database)])) {
// on windows with lower_case_table_names = 1
// MySQL returns
// with SHOW DATABASES or information_schema.SCHEMATA: `Test`
// but information_schema.TABLES gives `test`
// bug #2036
// https://sourceforge.net/p/phpmyadmin/bugs/2036/
return $tables[/*overload*/mb_strtolower($database)];
return $tables[mb_strtolower($database)];
}
return $tables;
@ -762,7 +762,7 @@ class DatabaseInterface
$tables[$table_name]['TABLE_COMMENT']
=& $tables[$table_name]['Comment'];
$commentUpper = /*overload*/mb_strtoupper(
$commentUpper = mb_strtoupper(
$tables[$table_name]['Comment']
);
if ($commentUpper === 'VIEW'

View File

@ -346,7 +346,7 @@ class DbQbe
$this->_columnNames[] = $each_column;
// increase the width if necessary
$this->_form_column_width = max(
/*overload*/mb_strlen($each_column),
mb_strlen($each_column),
$this->_form_column_width
);
} // end foreach
@ -587,7 +587,7 @@ class DbQbe
// then sorting is not available, Fix for Bug #570698
if (isset($_REQUEST['criteriaSort'][$colInd])
&& isset($_REQUEST['criteriaColumn'][$colInd])
&& /*overload*/mb_substr($_REQUEST['criteriaColumn'][$colInd], -2) == '.*'
&& mb_substr($_REQUEST['criteriaColumn'][$colInd], -2) == '.*'
) {
$_REQUEST['criteriaSort'][$colInd] = '';
} //end if
@ -1174,7 +1174,7 @@ class DbQbe
&& isset($this->_curAndOrCol)
) {
$where_clause .= ' '
. /*overload*/mb_strtoupper($this->_curAndOrCol[$last_where])
. mb_strtoupper($this->_curAndOrCol[$last_where])
. ' ';
}
if (! empty($this->_curField[$column_index])
@ -1211,7 +1211,7 @@ class DbQbe
&& $column_index
) {
$qry_orwhere .= ' '
. /*overload*/mb_strtoupper(
. mb_strtoupper(
$this->_curAndOrCol[$last_orwhere]
)
. ' ';
@ -1232,7 +1232,7 @@ class DbQbe
}
if (! empty($qry_orwhere)) {
$where_clause .= "\n"
. /*overload*/mb_strtoupper(
. mb_strtoupper(
isset($this->_curAndOrRow[$row_index])
? $this->_curAndOrRow[$row_index] . ' '
: ''
@ -1283,7 +1283,7 @@ class DbQbe
continue;
}
if (/*overload*/mb_substr($field[$column_index], -2) == '.*') {
if (mb_substr($field[$column_index], -2) == '.*') {
continue;
}
@ -1511,7 +1511,7 @@ class DbQbe
// Now we know that our array has the same numbers as $criteria
// we can check which of our columns has a where clause
if (! empty($this->_criteria[$column_index])) {
if (/*overload*/mb_substr($this->_criteria[$column_index], 0, 1) == '='
if (mb_substr($this->_criteria[$column_index], 0, 1) == '='
|| stristr($this->_criteria[$column_index], 'is')
) {
$where_clause_columns[$column] = $column;

View File

@ -214,14 +214,14 @@ class DbSearch
foreach ($search_words as $search_word) {
// Eliminates empty values
if (/*overload*/mb_strlen($search_word) === 0) {
if (mb_strlen($search_word) === 0) {
continue;
}
$likeClausesPerColumn = array();
// for each column in the table
foreach ($allColumns as $column) {
if (! isset($this->_criteriaColumnName)
|| /*overload*/mb_strlen($this->_criteriaColumnName) == 0
|| mb_strlen($this->_criteriaColumnName) == 0
|| $column['Field'] == $this->_criteriaColumnName
) {
$column = 'CONVERT(' . Util::backquote($column['Field'])

View File

@ -627,7 +627,7 @@ class DisplayResults
$the_total = $unlim_num_rows;
} elseif ((($displayParts['nav_bar'] == '1')
|| ($displayParts['sort_lnk'] == '1'))
&& (/*overload*/mb_strlen($db) && !empty($table))
&& (mb_strlen($db) && !empty($table))
) {
$the_total = $GLOBALS['dbi']->getTable($db, $table)->countRecords();
}
@ -1904,8 +1904,8 @@ class DisplayResults
$comments = '<span class="tblcomment" title="'
. $sanitized_comments . '">';
$limitChars = $GLOBALS['cfg']['LimitChars'];
if (/*overload*/mb_strlen($sanitized_comments) > $limitChars) {
$sanitized_comments = /*overload*/mb_substr(
if (mb_strlen($sanitized_comments) > $limitChars) {
$sanitized_comments = mb_substr(
$sanitized_comments, 0, $limitChars
) . '…';
}
@ -1952,7 +1952,7 @@ class DisplayResults
// FROM `PMA_relation` AS `1` , `PMA_relation` AS `2`
$sort_tbl = (isset($fields_meta->table)
&& /*overload*/mb_strlen($fields_meta->table)
&& mb_strlen($fields_meta->table)
&& $fields_meta->orgname == $fields_meta->name)
? Util::backquote(
$fields_meta->table
@ -2070,7 +2070,7 @@ class DisplayResults
$sort_tbl_new = $sort_tbl;
// Test to detect if the column name is a standard name
// Standard name has the table name prefixed to the column name
if (/*overload*/mb_strpos($name_to_use_in_sort, '.') !== false) {
if (mb_strpos($name_to_use_in_sort, '.') !== false) {
$matches = explode('.', $name_to_use_in_sort);
// Matches[0] has the table name
// Matches[1] has the column name
@ -2089,10 +2089,10 @@ class DisplayResults
// order by clause to the column name
$query_head = $is_first_clause ? "\nORDER BY " : "";
// Again a check to see if the given column is a aggregate column
if (/*overload*/mb_strpos($name_to_use_in_sort, '(') !== false) {
if (mb_strpos($name_to_use_in_sort, '(') !== false) {
$sort_order .= $query_head . $name_to_use_in_sort . ' ' ;
} else {
if (/*overload*/mb_strlen($sort_tbl_new) > 0) {
if (mb_strlen($sort_tbl_new) > 0) {
$sort_tbl_new .= ".";
}
$sort_order .= $query_head . $sort_tbl_new
@ -2106,7 +2106,7 @@ class DisplayResults
$sort_order = preg_replace("/\.\./", ".", $sort_order);
// Incase this is the current column save $single_sort_order
if ($current_name == $name_to_use_in_sort) {
if (/*overload*/mb_strpos($current_name, '(') !== false) {
if (mb_strpos($current_name, '(') !== false) {
$single_sort_order = "\n" . 'ORDER BY ' . $current_name . ' ';
} else {
$single_sort_order = "\n" . 'ORDER BY ' . $sort_tbl
@ -2140,10 +2140,10 @@ class DisplayResults
}
// remove the comma from the last column name in the newly
// constructed clause
$sort_order = /*overload*/mb_substr(
$sort_order = mb_substr(
$sort_order,
0,
/*overload*/mb_strlen($sort_order)-2
mb_strlen($sort_order)-2
);
if (empty($order_img)) {
$order_img = '';
@ -2173,7 +2173,7 @@ class DisplayResults
$index_in_expression = 0;
foreach ($sort_expression_nodirection as $index => $clause) {
if (/*overload*/mb_strpos($clause, '.') !== false) {
if (mb_strpos($clause, '.') !== false) {
$fragments = explode('.', $clause);
$clause2 = $fragments[0] . "." . str_replace('`', '', $fragments[1]);
} else {
@ -2196,10 +2196,10 @@ class DisplayResults
// Another query to test this:
// SELECT p.*, FROM_UNIXTIME(p.temps) FROM mytable AS p
// (and try clicking on each column's header twice)
$noSortTable = empty($sort_tbl) || /*overload*/mb_strpos(
$noSortTable = empty($sort_tbl) || mb_strpos(
$sort_expression_nodirection[$index_in_expression], $sort_tbl
) === false;
$noOpenParenthesis = /*overload*/mb_strpos(
$noOpenParenthesis = mb_strpos(
$sort_expression_nodirection[$index_in_expression], '('
) === false;
if (! empty($sort_tbl) && $noSortTable && $noOpenParenthesis) {
@ -2292,10 +2292,10 @@ class DisplayResults
) {
$order_link_params = array();
if (isset($order_img) && ($order_img != '')) {
if (/*overload*/mb_strstr($order_img, 'asc')) {
if (mb_strstr($order_img, 'asc')) {
$order_link_params['onmouseover'] = "$('.soimg$col_index').toggle()";
$order_link_params['onmouseout'] = "$('.soimg$col_index').toggle()";
} elseif (/*overload*/mb_strstr($order_img, 'desc')) {
} elseif (mb_strstr($order_img, 'desc')) {
$order_link_params['onmouseover'] = "$('.soimg$col_index').toggle()";
$order_link_params['onmouseout'] = "$('.soimg$col_index').toggle()";
}
@ -2625,12 +2625,12 @@ class DisplayResults
);
foreach ($matches as $key => $value) {
if (/*overload*/mb_strpos($meta->flags, $key) !== false) {
if (mb_strpos($meta->flags, $key) !== false) {
$classes[] = $value;
}
}
if (/*overload*/mb_strpos($meta->type, 'bit') !== false) {
if (mb_strpos($meta->type, 'bit') !== false) {
$classes[] = 'bit';
}
@ -3070,9 +3070,9 @@ class DisplayResults
// Check whether the field needs to display with syntax highlighting
$dbLower = /*overload*/mb_strtolower($this->__get('db'));
$tblLower = /*overload*/mb_strtolower($meta->orgtable);
$nameLower = /*overload*/mb_strtolower($meta->orgname);
$dbLower = mb_strtolower($this->__get('db'));
$tblLower = mb_strtolower($meta->orgtable);
$nameLower = mb_strtolower($meta->orgname);
if (! empty($this->transformation_info[$dbLower][$tblLower][$nameLower])
&& (trim($row[$i]) != '')
&& ! $_SESSION['tmpval']['hide_transformation']
@ -3091,8 +3091,8 @@ class DisplayResults
$meta->mimetype = str_replace(
'_', '/',
$this->transformation_info[$dbLower]
[/*overload*/mb_strtolower($meta->orgtable)]
[/*overload*/mb_strtolower($meta->orgname)][2]
[mb_strtolower($meta->orgtable)]
[mb_strtolower($meta->orgname)][2]
);
}
@ -3105,7 +3105,7 @@ class DisplayResults
) {
$linking_url = $this->_getSpecialLinkUrl(
$row[$i], $row_info, /*overload*/mb_strtolower($meta->orgname)
$row[$i], $row_info, mb_strtolower($meta->orgname)
);
$transformation_plugin = new Text_Plain_Link();
@ -3252,8 +3252,8 @@ class DisplayResults
$linking_url_params = array();
$link_relations = $GLOBALS['special_schema_links']
[/*overload*/mb_strtolower($this->__get('db'))]
[/*overload*/mb_strtolower($this->__get('table'))]
[mb_strtolower($this->__get('db'))]
[mb_strtolower($this->__get('table'))]
[$field_name];
if (! is_array($link_relations['link_param'])) {
@ -3284,7 +3284,7 @@ class DisplayResults
}
$linking_url_params[$new_param['param_info']]
= $row_info[/*overload*/mb_strtolower($new_param['column_name'])];
= $row_info[mb_strtolower($new_param['column_name'])];
// Special case 1 - when executing routines, according
// to the type of the routine, url param changes
@ -3314,7 +3314,7 @@ class DisplayResults
for ($n = 0; $n < $this->__get('fields_cnt'); ++$n) {
$m = $col_order ? $col_order[$n] : $n;
$row_info[/*overload*/mb_strtolower($fields_meta[$m]->name)]
$row_info[mb_strtolower($fields_meta[$m]->name)]
= $row[$m];
}
@ -3336,7 +3336,7 @@ class DisplayResults
private function _getUrlSqlQuery($analyzed_sql_results)
{
if (($analyzed_sql_results['querytype'] != 'SELECT')
|| (/*overload*/mb_strlen($this->__get('sql_query')) < 200)
|| (mb_strlen($this->__get('sql_query')) < 200)
) {
return $this->__get('sql_query');
}
@ -4336,7 +4336,7 @@ class DisplayResults
}
// 2.3 Prepare the navigation bars
if (!/*overload*/mb_strlen($this->__get('table'))) {
if (!mb_strlen($this->__get('table'))) {
if ($analyzed_sql_results['querytype'] == 'SELECT') {
// table does not always contain a real table name,
@ -4387,7 +4387,7 @@ class DisplayResults
}
}
if (/*overload*/mb_strlen($this->__get('table'))) {
if (mb_strlen($this->__get('table'))) {
// This method set the values for $map array
$this->_setParamForLinkForeignKeyRelatedTables($map);
@ -4527,7 +4527,7 @@ class DisplayResults
return null;
}
if (/*overload*/mb_strpos($sort_expression_nodirection, '.') === false) {
if (mb_strpos($sort_expression_nodirection, '.') === false) {
$sort_table = $this->__get('table');
$sort_column = $sort_expression_nodirection;
} else {
@ -4578,8 +4578,8 @@ class DisplayResults
$column_for_first_row = $row[$sorted_column_index];
}
$column_for_first_row = /*overload*/mb_strtoupper(
/*overload*/mb_substr(
$column_for_first_row = mb_strtoupper(
mb_substr(
$column_for_first_row, 0, $GLOBALS['cfg']['LimitChars']
) . '...'
);
@ -4604,8 +4604,8 @@ class DisplayResults
$column_for_last_row = $row[$sorted_column_index];
}
$column_for_last_row = /*overload*/mb_strtoupper(
/*overload*/mb_substr(
$column_for_last_row = mb_strtoupper(
mb_substr(
$column_for_last_row, 0, $GLOBALS['cfg']['LimitChars']
) . '...'
);
@ -5243,7 +5243,7 @@ class DisplayResults
if (isset($content)) {
$size = /*overload*/mb_strlen($content, '8bit');
$size = mb_strlen($content, '8bit');
$display_size = Util::formatByteDown($size, 3, 1);
$result .= ' - ' . $display_size[0] . ' ' . $display_size[1];
@ -5435,7 +5435,7 @@ class DisplayResults
// Field to display from the foreign table?
if (isset($map[$meta->name][2])
&& /*overload*/mb_strlen($map[$meta->name][2])
&& mb_strlen($map[$meta->name][2])
) {
$dispval = $this->_getFromForeign(
$map, $meta, $where_comparison
@ -5807,11 +5807,11 @@ class DisplayResults
*/
private function _getPartialText($str)
{
$original_length = /*overload*/mb_strlen($str);
$original_length = mb_strlen($str);
if ($original_length > $GLOBALS['cfg']['LimitChars']
&& $_SESSION['tmpval']['pftext'] === self::DISPLAY_PARTIAL_TEXT
) {
$str = /*overload*/mb_substr(
$str = mb_substr(
$str, 0, $GLOBALS['cfg']['LimitChars']
) . '...';
$truncated = true;

View File

@ -239,7 +239,7 @@ class Error extends Message
public function getHtmlTitle()
{
return htmlspecialchars(
/*overload*/mb_substr($this->getTitle(), 0, 100)
mb_substr($this->getTitle(), 0, 100)
);
}

View File

@ -723,7 +723,7 @@ class File
*/
public function getContentLength()
{
return /*overload*/mb_strlen($this->_content);
return mb_strlen($this->_content);
}
/**

View File

@ -101,18 +101,18 @@ class Font
$count = 0;
foreach ($charLists as $charList) {
$count += ((/*overload*/mb_strlen($text)
- /*overload*/mb_strlen(str_replace($charList["chars"], "", $text))
$count += ((mb_strlen($text)
- mb_strlen(str_replace($charList["chars"], "", $text))
) * $charList["modifier"]);
}
$text = str_replace(" ", "", $text);//remove the " "'s
//all other chars
$count = $count
+ (/*overload*/mb_strlen(preg_replace("/[a-z0-9]/i", "", $text)) * 0.3);
+ (mb_strlen(preg_replace("/[a-z0-9]/i", "", $text)) * 0.3);
$modifier = 1;
$font = /*overload*/mb_strtolower($font);
$font = mb_strtolower($font);
switch ($font) {
/*
* no modifier for arial and sans-serif

View File

@ -625,8 +625,8 @@ class Header
$retval = "<!DOCTYPE HTML>";
$retval .= "<html lang='$lang' dir='$dir' class='";
$retval .= /*overload*/mb_strtolower(PMA_USR_BROWSER_AGENT) . " ";
$retval .= /*overload*/mb_strtolower(PMA_USR_BROWSER_AGENT)
$retval .= mb_strtolower(PMA_USR_BROWSER_AGENT) . " ";
$retval .= mb_strtolower(PMA_USR_BROWSER_AGENT)
. intval(PMA_USR_BROWSER_VER) . "'>";
$retval .= '<head>';
@ -780,7 +780,7 @@ class Header
{
$retval = '';
if ($this->_menuEnabled
&& /*overload*/mb_strlen($table)
&& mb_strlen($table)
&& $GLOBALS['cfg']['NumRecentTables'] > 0
) {
$tmp_result = RecentFavoriteTable::getInstance('recent')

View File

@ -129,7 +129,7 @@ class Index
Index::_loadIndexes($table, $schema);
if (! isset(Index::$_registry[$schema][$table][$index_name])) {
$index = new Index;
if (/*overload*/mb_strlen($index_name)) {
if (mb_strlen($index_name)) {
$index->setName($index_name);
Index::$_registry[$schema][$table][$index->getName()] = $index;
}
@ -260,7 +260,7 @@ class Index
public function addColumn($params)
{
if (isset($params['Column_name'])
&& /*overload*/mb_strlen($params['Column_name'])
&& mb_strlen($params['Column_name'])
) {
$this->_columns[$params['Column_name']] = new IndexColumn($params);
}
@ -433,7 +433,7 @@ class Index
public function getComments()
{
$comments = $this->getRemarks();
if (/*overload*/mb_strlen($comments)) {
if (mb_strlen($comments)) {
$comments .= "\n";
}
$comments .= $this->getComment();

View File

@ -92,7 +92,7 @@ class Linter
public static function lint($query)
{
// Disabling lint for huge queries to save some resources.
if (/*overload*/mb_strlen($query) > 10000) {
if (mb_strlen($query) > 10000) {
return array(
array(
'message' => __(
@ -156,7 +156,7 @@ class Linter
// Ending position of the string that caused the error.
list($toLine, $toColumn) = static::findLineNumberAndColumn(
$lines, $error[3] + /*overload*/mb_strlen($error[2])
$lines, $error[3] + mb_strlen($error[2])
);
// Building the response.

View File

@ -138,7 +138,7 @@ class ListDatabase extends ListAbstract
protected function checkOnlyDatabase()
{
if (is_string($GLOBALS['cfg']['Server']['only_db'])
&& /*overload*/mb_strlen($GLOBALS['cfg']['Server']['only_db'])
&& mb_strlen($GLOBALS['cfg']['Server']['only_db'])
) {
$GLOBALS['cfg']['Server']['only_db'] = array(
$GLOBALS['cfg']['Server']['only_db']
@ -176,7 +176,7 @@ class ListDatabase extends ListAbstract
*/
public function getDefault()
{
if (/*overload*/mb_strlen($GLOBALS['db'])) {
if (mb_strlen($GLOBALS['db'])) {
return $GLOBALS['db'];
}

View File

@ -95,11 +95,11 @@ class Menu
{
$url_params = array('db' => $this->_db);
if (/*overload*/mb_strlen($this->_table)) {
if (mb_strlen($this->_table)) {
$tabs = $this->_getTableTabs();
$url_params['table'] = $this->_table;
$level = 'table';
} else if (/*overload*/mb_strlen($this->_db)) {
} else if (mb_strlen($this->_db)) {
$tabs = $this->_getDbTabs();
$level = 'db';
} else {
@ -144,9 +144,9 @@ class Menu
$result = PMA_queryAsControlUser($sql_query, false);
if ($result) {
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
$tabName = /*overload*/mb_substr(
$tabName = mb_substr(
$row['tab'],
/*overload*/mb_strpos($row['tab'], '_') + 1
mb_strpos($row['tab'], '_') + 1
);
unset($allowedTabs[$tabName]);
}
@ -201,7 +201,7 @@ class Menu
__('Server')
);
if (/*overload*/mb_strlen($this->_db)) {
if (mb_strlen($this->_db)) {
$retval .= $separator;
if (Util::showIcons('TabsMode')) {
$retval .= Util::getImage(
@ -221,7 +221,7 @@ class Menu
);
// if the table is being dropped, $_REQUEST['purge'] is set to '1'
// so do not display the table name in upper div
if (/*overload*/mb_strlen($this->_table)
if (mb_strlen($this->_table)
&& ! (isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')
) {
include './libraries/tbl_info.inc.php';
@ -255,7 +255,7 @@ class Menu
if (! empty($show_comment)
&& ! isset($GLOBALS['avoid_show_comment'])
) {
if (/*overload*/mb_strstr($show_comment, '; InnoDB free')) {
if (mb_strstr($show_comment, '; InnoDB free')) {
$show_comment = preg_replace(
'@; InnoDB free:.*?$@',
'',

View File

@ -502,7 +502,7 @@ class Message
*/
public function addMessage($message, $separator = ' ')
{
if (/*overload*/mb_strlen($separator)) {
if (mb_strlen($separator)) {
$this->addedMessages[] = $separator;
}
@ -629,11 +629,11 @@ class Message
{
$message = $this->message;
if (0 === /*overload*/mb_strlen($message)) {
if (0 === mb_strlen($message)) {
$string = $this->getString();
if (isset($GLOBALS[$string])) {
$message = $GLOBALS[$string];
} elseif (0 === /*overload*/mb_strlen($string)) {
} elseif (0 === mb_strlen($string)) {
$message = '';
} else {
$message = $string;

View File

@ -143,7 +143,7 @@ class PDF extends TCPDF
PMA_downloadHeader(
$filename,
'application/pdf',
/*overload*/mb_strlen($pdfData)
mb_strlen($pdfData)
);
echo $pdfData;
}

View File

@ -320,13 +320,13 @@ class Response
$debug = $this->_footer->getDebugMessage();
if (empty($_REQUEST['no_debug'])
&& /*overload*/mb_strlen($debug)
&& mb_strlen($debug)
) {
$this->addJSON('_debug', $debug);
}
$errors = $this->_footer->getErrorMessages();
if (/*overload*/mb_strlen($errors)) {
if (mb_strlen($errors)) {
$this->addJSON('_errors', $errors);
}
$promptPhpErrors = $GLOBALS['error_handler']->hasErrorsForPrompt();
@ -338,7 +338,7 @@ class Response
$query = '';
$maxChars = $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'];
if (isset($GLOBALS['sql_query'])
&& /*overload*/mb_strlen($GLOBALS['sql_query']) < $maxChars
&& mb_strlen($GLOBALS['sql_query']) < $maxChars
) {
$query = $GLOBALS['sql_query'];
}

View File

@ -53,7 +53,7 @@ class Scripts
$scripts = array();
$separator = PMA_URL_getArgSeparator();
foreach ($files as $value) {
if (/*overload*/mb_strpos($value['filename'], "?") !== false) {
if (mb_strpos($value['filename'], "?") !== false) {
$file_name = $value['filename'] . $separator
. Header::getVersionParameter();
if ($value['before_statics'] === true) {

View File

@ -286,7 +286,7 @@ class ServerStatusData
foreach ($server_status as $name => $value) {
$section_found = false;
foreach ($allocations as $filter => $section) {
if (/*overload*/mb_strpos($name, $filter) !== false) {
if (mb_strpos($name, $filter) !== false) {
$allocationMap[$name] = $section;
$sectionUsed[$section] = true;
$section_found = true;
@ -369,7 +369,7 @@ class ServerStatusData
// Set all class properties
$this->db_isLocal = false;
$serverHostToLower = /*overload*/mb_strtolower(
$serverHostToLower = mb_strtolower(
$GLOBALS['cfg']['Server']['host']
);
if ($serverHostToLower === 'localhost'

View File

@ -145,7 +145,7 @@ class StorageEngine
$selected = null, $offerUnavailableEngines = false,
$addEmpty = false
) {
$selected = /*overload*/mb_strtolower($selected);
$selected = mb_strtolower($selected);
$output = '<select name="' . $name . '"'
. (empty($id) ? '' : ' id="' . $id . '"') . '>' . "\n";
@ -166,7 +166,7 @@ class StorageEngine
$output .= ' <option value="' . htmlspecialchars($key) . '"'
. (empty($details['Comment'])
? '' : ' title="' . htmlspecialchars($details['Comment']) . '"')
. (/*overload*/mb_strtolower($key) == $selected
. (mb_strtolower($key) == $selected
|| (empty($selected) && $details['Support'] == 'DEFAULT' && ! $addEmpty)
? ' selected="selected"' : '')
. '>' . "\n"
@ -332,7 +332,7 @@ class StorageEngine
$mysql_vars[$row['Variable_name']]
= $variables[$row['Variable_name']];
} elseif (! $like
&& /*overload*/mb_strpos(/*overload*/mb_strtolower($row['Variable_name']), /*overload*/mb_strtolower($this->engine)) !== 0
&& mb_strpos(mb_strtolower($row['Variable_name']), mb_strtolower($this->engine)) !== 0
) {
continue;
}

View File

@ -26,10 +26,9 @@ class SysInfoLinux extends \PMA\libraries\SysInfo
$buf = file_get_contents('/proc/stat');
$nums = preg_split(
"/\s+/",
/*overload*/
mb_substr(
$buf,
0, /*overload*/
0,
mb_strpos($buf, "\n")
)
);
@ -89,4 +88,4 @@ class SysInfoLinux extends \PMA\libraries\SysInfo
return $mem;
}
}
}

View File

@ -247,7 +247,7 @@ class Table
foreach ($results as $result) {
$analyzed_sql[0]['create_table_fields'][$result['COLUMN_NAME']]
= array(
'type' => /*overload*/mb_strtoupper($result['DATA_TYPE'])
'type' => mb_strtoupper($result['DATA_TYPE'])
);
}
} else {
@ -287,7 +287,7 @@ class Table
// any of known merge engines?
return in_array(
/*overload*/mb_strtoupper($engine),
mb_strtoupper($engine),
array('MERGE', 'MRG_MYISAM')
);
}
@ -384,8 +384,8 @@ class Table
$default_type = 'USER_DEFINED', $default_value = '', $extra = '',
$comment = '', $virtuality = '', $expression = '', $move_to = ''
) {
$is_timestamp = /*overload*/mb_strpos(
/*overload*/mb_strtoupper($type),
$is_timestamp = mb_strpos(
mb_strtoupper($type),
'TIMESTAMP'
) !== false;
@ -757,7 +757,7 @@ class Table
// If the target database is not specified, the operation is taking
// place in the same database.
if (! isset($target_db) || ! /*overload*/mb_strlen($target_db)) {
if (! isset($target_db) || ! mb_strlen($target_db)) {
$target_db = $source_db;
}
@ -1234,7 +1234,7 @@ class Table
return false;
}
if (! /*overload*/mb_strlen($table_name)) {
if (! mb_strlen($table_name)) {
// zero length
return false;
}
@ -1636,8 +1636,7 @@ class Table
if (substr_compare(
$each_col,
$colname,
/*overload*/mb_strlen($each_col)
- /*overload*/mb_strlen($colname)
mb_strlen($each_col) - mb_strlen($colname)
) === 0
) {
return $this->uiprefs[$property];
@ -1785,10 +1784,9 @@ class Table
$this->_db_name, $this->_name
) as $row) {
if (preg_match('@^(set|enum)\((.+)\)$@i', $row['Type'], $tmp)) {
$tmp[2] = /*overload*/
mb_substr(
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
);
$tmp[2] = mb_substr(
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
);
$columns[$row['Field']] = $tmp[1] . '('
. str_replace(',', ', ', $tmp[2]) . ')';
} else {

View File

@ -78,7 +78,7 @@ class Tracker
*/
static protected function getTableName($string)
{
if (/*overload*/mb_strstr($string, '.')) {
if (mb_strstr($string, '.')) {
$temp = explode('.', $string);
$tablename = $temp[1];
} else {
@ -530,15 +530,15 @@ class Tracker
// For each log entry we want to get date, username and statement
foreach ($log_schema_entries as $log_entry) {
if (trim($log_entry) != '') {
$date = /*overload*/mb_substr($log_entry, 0, 19);
$username = /*overload*/mb_substr(
$log_entry, 20, /*overload*/mb_strpos($log_entry, "\n") - 20
$date = mb_substr($log_entry, 0, 19);
$username = mb_substr(
$log_entry, 20, mb_strpos($log_entry, "\n") - 20
);
if ($first_iteration) {
$ddl_date_from = $date;
$first_iteration = false;
}
$statement = rtrim(/*overload*/mb_strstr($log_entry, "\n"));
$statement = rtrim(mb_strstr($log_entry, "\n"));
$ddlog[] = array( 'date' => $date,
'username'=> $username,
@ -558,15 +558,15 @@ class Tracker
// For each log entry we want to get date, username and statement
foreach ($log_data_entries as $log_entry) {
if (trim($log_entry) != '') {
$date = /*overload*/mb_substr($log_entry, 0, 19);
$username = /*overload*/mb_substr(
$log_entry, 20, /*overload*/mb_strpos($log_entry, "\n") - 20
$date = mb_substr($log_entry, 0, 19);
$username = mb_substr(
$log_entry, 20, mb_strpos($log_entry, "\n") - 20
);
if ($first_iteration) {
$dml_date_from = $date;
$first_iteration = false;
}
$statement = rtrim(/*overload*/mb_strstr($log_entry, "\n"));
$statement = rtrim(mb_strstr($log_entry, "\n"));
$dmlog[] = array( 'date' => $date,
'username' => $username,
@ -628,11 +628,11 @@ class Tracker
$tokens = explode(" ", $query);
foreach ($tokens as $key => $value) {
$tokens[$key] = /*overload*/mb_strtoupper($value);
$tokens[$key] = mb_strtoupper($value);
}
// Parse USE statement, need it for SQL dump imports
if (/*overload*/mb_substr($query, 0, 4) == 'USE ') {
if (mb_substr($query, 0, 4) == 'USE ') {
$prefix = explode('USE ', $query);
$GLOBALS['db'] = self::getTableName($prefix[1]);
}
@ -653,7 +653,7 @@ class Tracker
$index = array_search('VIEW', $tokens);
$result['tablename'] = /*overload*/mb_strtolower(
$result['tablename'] = mb_strtolower(
self::getTableName($tokens[$index + 1])
);
}
@ -668,7 +668,7 @@ class Tracker
$index = array_search('VIEW', $tokens);
$result['tablename'] = /*overload*/mb_strtolower(
$result['tablename'] = mb_strtolower(
self::getTableName($tokens[$index + 1])
);
}
@ -844,7 +844,7 @@ class Tracker
static public function handleQuery($query)
{
// If query is marked as untouchable, leave
if (/*overload*/mb_strstr($query, "/*NOTRACK*/")) {
if (mb_strstr($query, "/*NOTRACK*/")) {
return;
}

View File

@ -24,7 +24,7 @@ class TypesMySQL extends Types
*/
public function getTypeDescription($type)
{
$type = /*overload*/mb_strtoupper($type);
$type = mb_strtoupper($type);
switch ($type) {
case 'TINYINT':
return __(
@ -227,7 +227,7 @@ class TypesMySQL extends Types
*/
public function getTypeClass($type)
{
$type = /*overload*/mb_strtoupper($type);
$type = mb_strtoupper($type);
switch ($type) {
case 'TINYINT':
case 'SMALLINT':

View File

@ -381,10 +381,10 @@ class Util
}
foreach ($quotes as $quote) {
if (/*overload*/mb_substr($quoted_string, 0, 1) === $quote
&& /*overload*/mb_substr($quoted_string, -1, 1) === $quote
if (mb_substr($quoted_string, 0, 1) === $quote
&& mb_substr($quoted_string, -1, 1) === $quote
) {
$unquoted_string = /*overload*/mb_substr($quoted_string, 1, -1);
$unquoted_string = mb_substr($quoted_string, 1, -1);
// replace escaped quotes
$unquoted_string = str_replace(
$quote . $quote,
@ -416,9 +416,9 @@ class Util
global $cfg;
if ($truncate
&& /*overload*/mb_strlen($sqlQuery) > $cfg['MaxCharactersInDisplayedSQL']
&& mb_strlen($sqlQuery) > $cfg['MaxCharactersInDisplayedSQL']
) {
$sqlQuery = /*overload*/mb_substr(
$sqlQuery = mb_substr(
$sqlQuery,
0,
$cfg['MaxCharactersInDisplayedSQL']
@ -459,7 +459,7 @@ class Util
public static function getMySQLDocuURL($link, $anchor = '')
{
// Fixup for newly used names:
$link = str_replace('_', '-', /*overload*/mb_strtolower($link));
$link = str_replace('_', '-', mb_strtolower($link));
if (empty($link)) {
$link = 'index';
@ -695,10 +695,10 @@ class Util
// Display the SQL query and link to MySQL documentation.
$error_msg .= '<p><strong>' . __('SQL query:') . '</strong>' . "\n";
$formattedSqlToLower = /*overload*/mb_strtolower($formatted_sql);
$formattedSqlToLower = mb_strtolower($formatted_sql);
// TODO: Show documentation for all statement types.
if (/*overload*/mb_strstr($formattedSqlToLower, 'select')) {
if (mb_strstr($formattedSqlToLower, 'select')) {
// please show me help to the error on select
$error_msg .= self::showMySQLDocu('SELECT');
}
@ -708,12 +708,12 @@ class Util
'sql_query' => $sql_query,
'show_query' => 1,
);
if (/*overload*/mb_strlen($table)) {
if (mb_strlen($table)) {
$_url_params['db'] = $db;
$_url_params['table'] = $table;
$doedit_goto = '<a href="tbl_sql.php'
. PMA_URL_getCommon($_url_params) . '">';
} elseif (/*overload*/mb_strlen($db)) {
} elseif (mb_strlen($db)) {
$_url_params['db'] = $db;
$doedit_goto = '<a href="db_sql.php'
. PMA_URL_getCommon($_url_params) . '">';
@ -784,7 +784,7 @@ class Util
}
if (!empty($back_url)) {
if (/*overload*/mb_strstr($back_url, '?')) {
if (mb_strstr($back_url, '?')) {
$back_url .= '&amp;no_history=true';
} else {
$back_url .= '?no_history=true';
@ -885,7 +885,7 @@ class Util
// in $group we save the reference to the place in $table_groups
// where to store the table info
if ($GLOBALS['cfg']['NavigationTreeEnableGrouping']
&& $sep && /*overload*/mb_strstr($table_name, $sep)
&& $sep && mb_strstr($table_name, $sep)
) {
$parts = explode($sep, $table_name);
@ -976,7 +976,7 @@ class Util
}
// '0' is also empty for php :-(
if (/*overload*/mb_strlen($a_name) && $a_name !== '*') {
if (mb_strlen($a_name) && $a_name !== '*') {
return '`' . str_replace('`', '``', $a_name) . '`';
} else {
return $a_name;
@ -1033,7 +1033,7 @@ class Util
}
// '0' is also empty for php :-(
if (/*overload*/mb_strlen($a_name) && $a_name !== '*') {
if (mb_strlen($a_name) && $a_name !== '*') {
return $quote . $a_name . $quote;
} else {
return $a_name;
@ -1142,14 +1142,14 @@ class Util
$query_too_big = false;
$queryLength = /*overload*/mb_strlen($query_base);
$queryLength = mb_strlen($query_base);
if ($queryLength > $cfg['MaxCharactersInDisplayedSQL']) {
// when the query is large (for example an INSERT of binary
// data), the parser chokes; so avoid parsing the query
$query_too_big = true;
$shortened_query_base = nl2br(
htmlspecialchars(
/*overload*/mb_substr(
mb_substr(
$sql_query,
0,
$cfg['MaxCharactersInDisplayedSQL']
@ -1173,9 +1173,9 @@ class Util
if (! isset($GLOBALS['db'])) {
$GLOBALS['db'] = '';
}
if (/*overload*/mb_strlen($GLOBALS['db'])) {
if (mb_strlen($GLOBALS['db'])) {
$url_params['db'] = $GLOBALS['db'];
if (/*overload*/mb_strlen($GLOBALS['table'])) {
if (mb_strlen($GLOBALS['table'])) {
$url_params['table'] = $GLOBALS['table'];
$edit_link = 'tbl_sql.php';
} else {
@ -1204,7 +1204,7 @@ class Util
$sql_query
)) {
$explain_params['sql_query']
= /*overload*/mb_substr($sql_query, 8);
= mb_substr($sql_query, 8);
$explain_link = ' ['
. self::linkOrButton(
'import.php' . PMA_URL_getCommon($explain_params),
@ -1628,13 +1628,13 @@ class Util
$return_value = -1;
if (preg_match('/^[0-9]+GB$/', $formatted_size)) {
$return_value = /*overload*/mb_substr($formatted_size, 0, -2)
$return_value = mb_substr($formatted_size, 0, -2)
* self::pow(1024, 3);
} elseif (preg_match('/^[0-9]+MB$/', $formatted_size)) {
$return_value = /*overload*/mb_substr($formatted_size, 0, -2)
$return_value = mb_substr($formatted_size, 0, -2)
* self::pow(1024, 2);
} elseif (preg_match('/^[0-9]+K$/', $formatted_size)) {
$return_value = /*overload*/mb_substr($formatted_size, 0, -1)
$return_value = mb_substr($formatted_size, 0, -1)
* self::pow(1024, 1);
}
return $return_value;
@ -1890,7 +1890,7 @@ class Util
$url, $message, $tag_params = array(),
$new_form = true, $strip_img = false, $target = '', $force_button = false
) {
$url_length = /*overload*/mb_strlen($url);
$url_length = mb_strlen($url);
// with this we should be able to catch case of image upload
// into a (MEDIUM) BLOB; not worth generating even a form for these
if ($url_length > $GLOBALS['cfg']['LinkLengthLimit'] * 100) {
@ -1935,7 +1935,7 @@ class Util
}
list(, $eachval) = explode('=', $query_pair);
if (/*overload*/mb_strlen($eachval) > $suhosin_get_MaxValueLength
if (mb_strlen($eachval) > $suhosin_get_MaxValueLength
) {
$in_suhosin_limits = false;
break;
@ -1951,7 +1951,7 @@ class Util
$tag_params_strings = array();
foreach ($tag_params as $par_name => $par_value) {
// htmlspecialchars() only on non javascript
$par_value = /*overload*/mb_substr($par_name, 0, 2) == 'on'
$par_value = mb_substr($par_name, 0, 2) == 'on'
? $par_value
: htmlspecialchars($par_value);
$tag_params_strings[] = $par_name . '="' . $par_value . '"';
@ -2009,7 +2009,7 @@ class Util
$tag_params_strings = array();
foreach ($tag_params as $par_name => $par_value) {
// htmlspecialchars() only on non javascript
$par_value = /*overload*/mb_substr($par_name, 0, 2) == 'on'
$par_value = mb_substr($par_name, 0, 2) == 'on'
? $par_value
: htmlspecialchars($par_value);
$tag_params_strings[] = $par_name . '="' . $par_value . '"';
@ -2109,7 +2109,7 @@ class Util
$format_string = '';
$charbuff = false;
for ($i = 0, $str_len = /*overload*/mb_strlen($string);
for ($i = 0, $str_len = mb_strlen($string);
$i < $str_len;
$i++
) {
@ -2228,7 +2228,7 @@ class Util
$meta = $fields_meta[$i];
// do not use a column alias in a condition
if (! isset($meta->orgname) || ! /*overload*/mb_strlen($meta->orgname)) {
if (! isset($meta->orgname) || ! mb_strlen($meta->orgname)) {
$meta->orgname = $meta->name;
if (!empty($analyzed_sql_results['statement']->expr)) {
@ -2299,7 +2299,7 @@ class Util
// hexify only if this is a true not empty BLOB or a BINARY
// do not waste memory building a too big condition
if (/*overload*/mb_strlen($row[$i]) < 1000) {
if (mb_strlen($row[$i]) < 1000) {
// use a CAST if possible, to avoid problems
// if the field contains wildcard characters % or _
$con_val = '= CAST(0x' . bin2hex($row[$i]) . ' AS BINARY)';
@ -2307,7 +2307,7 @@ class Util
// when this blob is the only field present
// try settling with length comparison
$condition = ' CHAR_LENGTH(' . $con_key . ') ';
$con_val = ' = ' . /*overload*/mb_strlen($row[$i]);
$con_val = ' = ' . mb_strlen($row[$i]);
} else {
// this blob won't be part of the final condition
$con_val = null;
@ -2316,7 +2316,7 @@ class Util
&& ! empty($row[$i])
) {
// do not build a too big condition
if (/*overload*/mb_strlen($row[$i]) < 5000) {
if (mb_strlen($row[$i]) < 5000) {
$condition .= '=0x' . bin2hex($row[$i]) . ' AND';
} else {
$condition = '';
@ -2679,7 +2679,7 @@ class Util
public static function userDir($dir)
{
// add trailing slash
if (/*overload*/mb_substr($dir, -1) != '/') {
if (mb_substr($dir, -1) != '/') {
$dir .= '/';
}
@ -2695,8 +2695,8 @@ class Util
*/
public static function getDbLink($database = null)
{
if (! /*overload*/mb_strlen($database)) {
if (! /*overload*/mb_strlen($GLOBALS['db'])) {
if (! mb_strlen($database)) {
if (! mb_strlen($GLOBALS['db'])) {
return '';
}
$database = $GLOBALS['db'];
@ -3129,24 +3129,24 @@ class Util
*/
public static function extractColumnSpec($columnspec)
{
$first_bracket_pos = /*overload*/mb_strpos($columnspec, '(');
$first_bracket_pos = mb_strpos($columnspec, '(');
if ($first_bracket_pos) {
$spec_in_brackets = chop(
/*overload*/mb_substr(
mb_substr(
$columnspec,
$first_bracket_pos + 1,
/*overload*/mb_strrpos($columnspec, ')') - $first_bracket_pos - 1
mb_strrpos($columnspec, ')') - $first_bracket_pos - 1
)
);
// convert to lowercase just to be sure
$type = /*overload*/mb_strtolower(
chop(/*overload*/mb_substr($columnspec, 0, $first_bracket_pos))
$type = mb_strtolower(
chop(mb_substr($columnspec, 0, $first_bracket_pos))
);
} else {
// Split trailing attributes such as unsigned,
// binary, zerofill and get data type name
$type_parts = explode(' ', $columnspec);
$type = /*overload*/mb_strtolower($type_parts[0]);
$type = mb_strtolower($type_parts[0]);
$spec_in_brackets = '';
}
@ -3162,7 +3162,7 @@ class Util
$enum_set_values = array();
/* Create printable type name */
$printtype = /*overload*/mb_strtolower($columnspec);
$printtype = mb_strtolower($columnspec);
// Strip the "BINARY" attribute, except if we find "BINARY(" because
// this would be a BINARY or VARBINARY column type;
@ -3210,10 +3210,10 @@ class Util
// for the case ENUM('&#8211;','&ldquo;')
$displayed_type = htmlspecialchars($printtype);
if (/*overload*/mb_strlen($printtype) > $GLOBALS['cfg']['LimitChars']) {
if (mb_strlen($printtype) > $GLOBALS['cfg']['LimitChars']) {
$displayed_type = '<abbr title="' . htmlspecialchars($printtype) . '">';
$displayed_type .= htmlspecialchars(
/*overload*/mb_substr(
mb_substr(
$printtype, 0, $GLOBALS['cfg']['LimitChars']
) . '...'
);
@ -3379,7 +3379,7 @@ class Util
*/
public static function duplicateFirstNewline($string)
{
$first_occurence = /*overload*/mb_strpos($string, "\r\n");
$first_occurence = mb_strpos($string, "\r\n");
if ($first_occurence === 0) {
$string = "\n" . $string;
}
@ -3560,12 +3560,12 @@ class Util
}
/* Backward compatibility in 3.5.x */
if (/*overload*/mb_strpos($string, '@FIELDS@') !== false) {
if (mb_strpos($string, '@FIELDS@') !== false) {
$string = strtr($string, array('@FIELDS@' => '@COLUMNS@'));
}
/* Fetch columns list if required */
if (/*overload*/mb_strpos($string, '@COLUMNS@') !== false) {
if (mb_strpos($string, '@COLUMNS@') !== false) {
$columns_list = $GLOBALS['dbi']->getColumns(
$GLOBALS['db'], $GLOBALS['table']
);
@ -3825,7 +3825,7 @@ class Util
if ($upper_case) {
for ($i = 0, $nb = count($gis_data_types); $i < $nb; $i++) {
$gis_data_types[$i]
= /*overload*/mb_strtoupper($gis_data_types[$i]);
= mb_strtoupper($gis_data_types[$i]);
}
}
return $gis_data_types;
@ -3882,7 +3882,7 @@ class Util
$funcs['IsEmpty'] = array('params' => 1, 'type' => 'int');
$funcs['IsSimple'] = array('params' => 1, 'type' => 'int');
$geom_type = trim(/*overload*/mb_strtolower($geom_type));
$geom_type = trim(mb_strtolower($geom_type));
if ($display && $geom_type != 'geometry' && $geom_type != 'multipoint') {
$funcs[] = array('display' => '--------');
}
@ -4192,12 +4192,12 @@ class Util
{
$server_type = 'MySQL';
if (/*overload*/mb_stripos(PMA_MYSQL_STR_VERSION, 'mariadb') !== false) {
if (mb_stripos(PMA_MYSQL_STR_VERSION, 'mariadb') !== false) {
$server_type = 'MariaDB';
return $server_type;
}
if (/*overload*/mb_stripos(PMA_MYSQL_VERSION_COMMENT, 'percona') !== false) {
if (mb_stripos(PMA_MYSQL_VERSION_COMMENT, 'percona') !== false) {
$server_type = 'Percona Server';
return $server_type;
}
@ -4237,14 +4237,14 @@ class Util
$in_string = false;
$buffer = '';
for ($i = 0, $length = /*overload*/mb_strlen($values_string);
for ($i = 0, $length = mb_strlen($values_string);
$i < $length;
$i++
) {
$curr = /*overload*/mb_substr($values_string, $i, 1);
$next = ($i == /*overload*/mb_strlen($values_string) - 1)
$curr = mb_substr($values_string, $i, 1);
$next = ($i == mb_strlen($values_string) - 1)
? ''
: /*overload*/mb_substr($values_string, $i + 1, 1);
: mb_substr($values_string, $i + 1, 1);
if (! $in_string && $curr == "'") {
$in_string = true;
@ -4266,7 +4266,7 @@ class Util
}
if (/*overload*/mb_strlen($buffer) > 0) {
if (mb_strlen($buffer) > 0) {
// The leftovers in the buffer are the last value (if any)
$values[] = $buffer;
}
@ -4381,12 +4381,12 @@ class Util
*/
public static function handleContext(array $context)
{
if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {
if (mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {
$context['http'] = array(
'proxy' => $GLOBALS['cfg']['ProxyUrl'],
'request_fulluri' => true
);
if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUser'])) {
if (mb_strlen($GLOBALS['cfg']['ProxyUser'])) {
$auth = base64_encode(
$GLOBALS['cfg']['ProxyUser'] . ':' . $GLOBALS['cfg']['ProxyPass']
);
@ -4407,9 +4407,9 @@ class Util
*/
public static function configureCurl($curl_handle)
{
if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {
if (mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {
curl_setopt($curl_handle, CURLOPT_PROXY, $GLOBALS['cfg']['ProxyUrl']);
if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUser'])) {
if (mb_strlen($GLOBALS['cfg']['ProxyUser'])) {
curl_setopt(
$curl_handle,
CURLOPT_PROXYUSERPWD,
@ -4436,15 +4436,15 @@ class Util
return $value;
}
if (/*overload*/mb_strpos($value, '.') === false) {
if (mb_strpos($value, '.') === false) {
return $value . '.000000';
}
$value .= '000000';
return /*overload*/mb_substr(
return mb_substr(
$value,
0,
/*overload*/mb_strpos($value, '.') + 7
mb_strpos($value, '.') + 7
);
}

View File

@ -185,8 +185,8 @@ function PMA_Bookmark_save($bkm_fields, $all_users = false)
$cfgBookmark = PMA_Bookmark_getParams();
if (!(isset($bkm_fields['bkm_sql_query']) && isset($bkm_fields['bkm_label'])
&& /*overload*/mb_strlen($bkm_fields['bkm_sql_query']) > 0
&& /*overload*/mb_strlen($bkm_fields['bkm_label']) > 0)
&& mb_strlen($bkm_fields['bkm_sql_query']) > 0
&& mb_strlen($bkm_fields['bkm_label']) > 0)
) {
return false;
}

View File

@ -211,7 +211,7 @@ function PMA_getHtmlForRelationalFieldSelection($db, $table, $field, $foreignDat
function PMA_getDescriptionAndTitle($description)
{
$limitChars = $GLOBALS['cfg']['LimitChars'];
if (/*overload*/mb_strlen($description) <= $limitChars) {
if (mb_strlen($description) <= $limitChars) {
$description = htmlspecialchars(
$description
);
@ -221,7 +221,7 @@ function PMA_getDescriptionAndTitle($description)
$description
);
$description = htmlspecialchars(
/*overload*/mb_substr(
mb_substr(
$description, 0, $limitChars
)
. '...'

View File

@ -883,7 +883,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $odd_row, $row_num, $db)
'columnNumber' => $row_num,
'ci' => 1,
'ci_offset' => 0,
'type_upper' => /*overload*/mb_strtoupper($row['col_type']),
'type_upper' => mb_strtoupper($row['col_type']),
'columnMeta' => array()
)
)
@ -926,7 +926,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $odd_row, $row_num, $db)
'columnNumber' => $row_num,
'ci' => 3,
'ci_offset' => 0,
'type_upper' => /*overload*/mb_strtoupper($row['col_type']),
'type_upper' => mb_strtoupper($row['col_type']),
'columnMeta' => $meta
)
)
@ -1032,7 +1032,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $odd_row, $row_num)
'columnNumber' => $row_num,
'ci' => 1,
'ci_offset' => 0,
'type_upper' => /*overload*/mb_strtoupper($row['col_type']),
'type_upper' => mb_strtoupper($row['col_type']),
'columnMeta' => array()
)
)
@ -1070,7 +1070,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $odd_row, $row_num)
'columnNumber' => $row_num,
'ci' => 3,
'ci_offset' => 0,
'type_upper' => /*overload*/mb_strtoupper($row['col_default']),
'type_upper' => mb_strtoupper($row['col_default']),
'columnMeta' => $meta
)
)

View File

@ -291,17 +291,17 @@ function PMA_analyseShowGrant()
while ($row = $GLOBALS['dbi']->fetchRow($rs_usr)) {
// extract db from GRANT ... ON *.* or GRANT ... ON db.*
$db_name_offset = /*overload*/mb_strpos($row[0], ' ON ') + 4;
$show_grants_dbname = /*overload*/mb_substr(
$db_name_offset = mb_strpos($row[0], ' ON ') + 4;
$show_grants_dbname = mb_substr(
$row[0], $db_name_offset,
/*overload*/mb_strpos($row[0], '.', $db_name_offset) - $db_name_offset
mb_strpos($row[0], '.', $db_name_offset) - $db_name_offset
);
$show_grants_dbname = PMA\libraries\Util::unQuote($show_grants_dbname, '`');
$show_grants_str = /*overload*/mb_substr(
$show_grants_str = mb_substr(
$row[0],
6,
(/*overload*/mb_strpos($row[0], ' ON ') - 6)
(mb_strpos($row[0], ' ON ') - 6)
);
if ($show_grants_dbname == '*') {
@ -353,7 +353,7 @@ function PMA_analyseShowGrant()
'/' . $re1 . '(%|_)/', '\\1\\3', $dbname_to_test
)
)
&& /*overload*/mb_substr($GLOBALS['dbi']->getError(), 1, 4) != 1044)
&& mb_substr($GLOBALS['dbi']->getError(), 1, 4) != 1044)
) {
/**
* Do not handle the underscore wildcard

View File

@ -613,8 +613,8 @@ if (! defined('PMA_MINIMUM_COMMON')) {
&& ! is_numeric($_REQUEST['server'])
) {
foreach ($cfg['Servers'] as $i => $server) {
$verboseToLower = /*overload*/mb_strtolower($server['verbose']);
$serverToLower = /*overload*/mb_strtolower($_REQUEST['server']);
$verboseToLower = mb_strtolower($server['verbose']);
$serverToLower = mb_strtolower($_REQUEST['server']);
if ($server['host'] == $_REQUEST['server']
|| $server['verbose'] == $_REQUEST['server']
|| $verboseToLower == $serverToLower
@ -709,7 +709,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// to allow HTTP or http
$cfg['Server']['auth_type']
= /*overload*/mb_strtolower($cfg['Server']['auth_type']);
= mb_strtolower($cfg['Server']['auth_type']);
/**
* the required auth type plugin
@ -802,7 +802,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
// if using TCP socket is not needed
if (/*overload*/mb_strtolower($cfg['Server']['connect_type']) == 'tcp') {
if (mb_strtolower($cfg['Server']['connect_type']) == 'tcp') {
$cfg['Server']['socket'] = '';
}

View File

@ -77,9 +77,9 @@ class Form
public function getOptionType($option_name)
{
$key = ltrim(
/*overload*/mb_substr(
mb_substr(
$option_name,
/*overload*/mb_strrpos($option_name, '/')
mb_strrpos($option_name, '/')
),
'/'
);
@ -182,7 +182,7 @@ class Form
$this->fields = array();
foreach ($paths as $path) {
$key = ltrim(
/*overload*/mb_substr($path, /*overload*/mb_strrpos($path, '/')),
mb_substr($path, mb_strrpos($path, '/')),
'/'
);
$this->fields[$key] = $path;
@ -199,7 +199,7 @@ class Form
{
$cf = $this->_configFile;
foreach ($this->fields as $name => $path) {
if (/*overload*/mb_strpos($name, ':group:') === 0) {
if (mb_strpos($name, ':group:') === 0) {
$this->_fieldsTypes[$name] = 'group';
continue;
}

View File

@ -422,9 +422,9 @@ class FormDisplay
case 'group':
// :group:end is changed to :group:end:{unique id} in Form class
$htmlOutput = '';
if (/*overload*/mb_substr($field, 7, 4) != 'end:') {
if (mb_substr($field, 7, 4) != 'end:') {
$htmlOutput .= PMA_displayGroupHeader(
/*overload*/mb_substr($field, 7)
mb_substr($field, 7)
);
} else {
PMA_displayGroupFooter();
@ -437,7 +437,7 @@ class FormDisplay
// detect password fields
if ($type === 'text'
&& /*overload*/mb_substr($translated_path, -9) === '-password'
&& mb_substr($translated_path, -9) === '-password'
) {
$type = 'password';
}
@ -746,7 +746,7 @@ class FormDisplay
*/
public function getDocLink($path)
{
$test = /*overload*/mb_substr($path, 0, 6);
$test = mb_substr($path, 0, 6);
if ($test == 'Import' || $test == 'Export') {
return '';
}

View File

@ -276,7 +276,7 @@ function PMA_displayInput($path, $name, $type, $value, $description = '',
foreach ($opts['values'] as $opt_value_key => $opt_value) {
// set names for boolean values
if (is_bool($opt_value)) {
$opt_value = /*overload*/mb_strtolower(
$opt_value = mb_strtolower(
$opt_value ? __('Yes') : __('No')
);
}

View File

@ -342,7 +342,7 @@ class ServerConfigChecks
} else {
$blowfishWarnings = array();
// check length
if (/*overload*/mb_strlen($blowfishSecret) < 8) {
if (mb_strlen($blowfishSecret) < 8) {
// too short key
$blowfishWarnings[] = __(
'Key is too short, it should have at least 8 characters.'

View File

@ -57,9 +57,9 @@ class Validator
continue;
}
for ($i = 1, $nb = count($uv); $i < $nb; $i++) {
if (/*overload*/mb_substr($uv[$i], 0, 6) == 'value:') {
if (mb_substr($uv[$i], 0, 6) == 'value:') {
$uv[$i] = PMA_arrayRead(
/*overload*/mb_substr($uv[$i], 6),
mb_substr($uv[$i], 6),
$GLOBALS['PMA_Config']->base_settings
);
}
@ -111,7 +111,7 @@ class Validator
$key_map = array();
foreach ($values as $k => $v) {
$k2 = $isPostSource ? str_replace('-', '/', $k) : $k;
$k2 = /*overload*/mb_strpos($k2, '/')
$k2 = mb_strpos($k2, '/')
? $cf->getCanonicalPath($k2)
: $k2;
$key_map[$k2] = $k;

View File

@ -891,7 +891,7 @@ class DatabaseStructureController extends DatabaseController
foreach ($db as $db_table) {
if ($this->db == PMA_extractDbOrTable($db_table)
&& preg_match(
"@^" . /*overload*/
"@^" .
mb_substr(PMA_extractDbOrTable($db_table, 'table'), 0, -1) . "@",
$truename
)

View File

@ -240,7 +240,7 @@ class ServerDatabasesController extends Controller
}
if (isset($_REQUEST['sort_order'])
&& /*overload*/mb_strtolower($_REQUEST['sort_order']) == 'desc'
&& mb_strtolower($_REQUEST['sort_order']) == 'desc'
) {
$this->_sort_order = 'desc';
} else {
@ -472,7 +472,7 @@ class ServerDatabasesController extends Controller
$current["SCHEMA_NAME"],
$replication_info[$type]['Ignore_DB']
);
if (/*overload*/mb_strlen($key) > 0) {
if (mb_strlen($key) > 0) {
$out = Util::getIcon(
's_cancel.png',
__('Not replicated')
@ -482,7 +482,7 @@ class ServerDatabasesController extends Controller
$current["SCHEMA_NAME"], $replication_info[$type]['Do_DB']
);
if (/*overload*/mb_strlen($key) > 0
if (mb_strlen($key) > 0
|| (isset($replication_info[$type]['Do_DB'][0])
&& $replication_info[$type]['Do_DB'][0] == ""
&& count($replication_info[$type]['Do_DB']) == 1)

View File

@ -183,7 +183,7 @@ class ServerVariablesController extends Controller
);
$value = floatval($matches[1]) * Util::pow(
1024,
$exp[/*overload*/mb_strtolower($matches[3])]
$exp[mb_strtolower($matches[3])]
);
} else {
$value = Util::sqlAddSlashes($value);

View File

@ -104,14 +104,14 @@ class TableChartController extends TableController
/**
* Runs common work
*/
if (/*overload*/ mb_strlen($this->table)) {
if (mb_strlen($this->table)) {
$url_params['goto'] = Util::getScriptNameForOption(
$this->cfg['DefaultTabTable'], 'table'
);
$url_params['back'] = 'tbl_sql.php';
include 'libraries/tbl_common.inc.php';
include 'libraries/tbl_info.inc.php';
} elseif (/*overload*/ mb_strlen($this->db)) {
} elseif (mb_strlen($this->db)) {
$url_params['goto'] = Util::getScriptNameForOption(
$this->cfg['DefaultTabDatabase'], 'database'
);
@ -187,10 +187,8 @@ class TableChartController extends TableController
$db = &$this->db;
$table = &$this->table;
$tableLength = /*overload*/
mb_strlen($this->table);
$dbLength = /*overload*/
mb_strlen($this->db);
$tableLength = mb_strlen($this->table);
$dbLength = mb_strlen($this->db);
if ($tableLength && $dbLength) {
include './libraries/tbl_common.inc.php';
}

View File

@ -340,7 +340,7 @@ class TableRelationController extends TableController
while ($row = $this->dbi->fetchArray($tables_rs)) {
if (isset($row['Engine'])
&& /*overload*/ mb_strtoupper($row['Engine']) == $this->tbl_storage_engine
&& mb_strtoupper($row['Engine']) == $this->tbl_storage_engine
) {
$tables[] = htmlspecialchars($row['Name']);
}

View File

@ -145,7 +145,7 @@ class TableSearchController extends TableController
}
$type = preg_replace('@ZEROFILL@i', '', $type);
$type = preg_replace('@UNSIGNED@i', '', $type);
$type = /*overload*/mb_strtolower($type);
$type = mb_strtolower($type);
}
if (empty($type)) {
$type = '&nbsp;';
@ -1090,7 +1090,7 @@ class TableSearchController extends TableController
$gis_data = Util::createGISData($criteriaValues);
$where = $geom_function_applied . " " . $func_type . " " . $gis_data;
} elseif (/*overload*/mb_strlen($criteriaValues) > 0) {
} elseif (mb_strlen($criteriaValues) > 0) {
$where = $geom_function_applied . " "
. $func_type . " '" . $criteriaValues . "'";
}
@ -1134,7 +1134,7 @@ class TableSearchController extends TableController
// strings to numbers and numbers to strings as necessary
// during the comparison
if (preg_match('@char|binary|blob|text|set|date|time|year@i', $types)
|| /*overload*/mb_strpos(' ' . $func_type, 'LIKE')
|| mb_strpos(' ' . $func_type, 'LIKE')
) {
$quot = '\'';
} else {

View File

@ -440,7 +440,7 @@ class TableStructureController extends TableController
$changes[] = 'CHANGE ' . Table::generateAlter(
$column,
$column,
/*overload*/mb_strtoupper($extracted_columnspec['type']),
mb_strtoupper($extracted_columnspec['type']),
$extracted_columnspec['spec_in_brackets'],
$extracted_columnspec['attribute'],
isset($data['Collation']) ? $data['Collation'] : '',
@ -882,7 +882,7 @@ class TableStructureController extends TableController
Table::PROP_SORTED_COLUMN
);
// if the old column name is part of the remembered sort expression
if (/*overload*/mb_strpos(
if (mb_strpos(
$sorted_col,
Util::backquote($_REQUEST['field_orig'][$i])
) !== false) {
@ -1053,7 +1053,7 @@ class TableStructureController extends TableController
) {
foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) {
if (isset($_REQUEST['field_name'][$fieldindex])
&& /*overload*/mb_strlen(
&& mb_strlen(
$_REQUEST['field_name'][$fieldindex]
)
) {

View File

@ -163,7 +163,7 @@ function PMA_isValid(&$var, $type = 'length', $compare = null)
if ($type === 'length' || $type === 'scalar') {
$is_scalar = is_scalar($var);
if ($is_scalar && $type === 'length') {
return (bool) /*overload*/mb_strlen($var);
return (bool) mb_strlen($var);
}
return $is_scalar;
}
@ -423,20 +423,20 @@ function PMA_checkPageValidity(&$page, $whitelist)
return true;
}
$_page = /*overload*/mb_substr(
$_page = mb_substr(
$page,
0,
/*overload*/mb_strpos($page . '?', '?')
mb_strpos($page . '?', '?')
);
if (in_array($_page, $whitelist)) {
return true;
}
$_page = urldecode($page);
$_page = /*overload*/mb_substr(
$_page = mb_substr(
$_page,
0,
/*overload*/mb_strpos($_page . '?', '?')
mb_strpos($_page . '?', '?')
);
if (in_array($_page, $whitelist)) {
return true;
@ -488,7 +488,7 @@ function PMA_getenv($var_name)
*/
function PMA_sendHeaderLocation($uri, $use_refresh = false)
{
if (PMA_IS_IIS && /*overload*/mb_strlen($uri) > 600) {
if (PMA_IS_IIS && mb_strlen($uri) > 600) {
include_once './libraries/js_escape.lib.php';
PMA\libraries\Response::getInstance()->disable();
@ -499,7 +499,7 @@ function PMA_sendHeaderLocation($uri, $use_refresh = false)
}
if (SID) {
if (/*overload*/mb_strpos($uri, '?') === false) {
if (mb_strpos($uri, '?') === false) {
header('Location: ' . $uri . '?' . SID);
} else {
$separator = PMA_URL_getArgSeparator();
@ -757,7 +757,7 @@ function PMA_isAllowedDomain($url)
'ronaldbradford.com',
'xaprb.com',
);
if (in_array(/*overload*/mb_strtolower($domain), $domainWhiteList)) {
if (in_array(mb_strtolower($domain), $domainWhiteList)) {
return true;
}
@ -910,10 +910,10 @@ function PMA_cleanupPathInfo()
$PMA_PHP_SELF = PMA_getenv('PHP_SELF');
$_PATH_INFO = PMA_getenv('PATH_INFO');
if (! empty($_PATH_INFO) && ! empty($PMA_PHP_SELF)) {
$path_info_pos = /*overload*/mb_strrpos($PMA_PHP_SELF, $_PATH_INFO);
$pathLength = $path_info_pos + /*overload*/mb_strlen($_PATH_INFO);
if ($pathLength === /*overload*/mb_strlen($PMA_PHP_SELF)) {
$PMA_PHP_SELF = /*overload*/mb_substr($PMA_PHP_SELF, 0, $path_info_pos);
$path_info_pos = mb_strrpos($PMA_PHP_SELF, $_PATH_INFO);
$pathLength = $path_info_pos + mb_strlen($_PATH_INFO);
if ($pathLength === mb_strlen($PMA_PHP_SELF)) {
$PMA_PHP_SELF = mb_substr($PMA_PHP_SELF, 0, $path_info_pos);
}
}
$PMA_PHP_SELF = htmlspecialchars($PMA_PHP_SELF);

View File

@ -44,7 +44,7 @@ $err_url = PMA\libraries\Util::getScriptNameForOption(
* headers
*/
if (! isset($is_db) || ! $is_db) {
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$is_db = $GLOBALS['dbi']->selectDb($db);
// This "Command out of sync" 2014 error may happen, for example
// after calling a MySQL procedure; at this point we can't select
@ -60,7 +60,7 @@ if (! isset($is_db) || ! $is_db) {
$uri = $cfg['PmaAbsoluteUri'] . 'index.php'
. PMA_URL_getCommon(array(), 'text')
. (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1';
if (!/*overload*/mb_strlen($db) || ! $is_db) {
if (!mb_strlen($db) || ! $is_db) {
$response = PMA\libraries\Response::getInstance();
if ($response->isAjax()) {
$response->setRequestStatus(false);

View File

@ -13,7 +13,7 @@ if (! defined('PHPMYADMIN')) {
}
if (empty($is_db)) {
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$is_db = @$GLOBALS['dbi']->selectDb($db);
} else {
$is_db = false;
@ -56,7 +56,7 @@ if (empty($is_table)
) {
// Not a valid table name -> back to the db_sql.php
if (/*overload*/mb_strlen($table)) {
if (mb_strlen($table)) {
$is_table = $GLOBALS['dbi']->getCachedTableContent("${db}.${table}", false);
if (! $is_table) {
@ -74,7 +74,7 @@ if (empty($is_table)
if (! $is_table) {
if (!defined('IS_TRANSFORMATION_WRAPPER')) {
if (/*overload*/mb_strlen($table)) {
if (mb_strlen($table)) {
// SHOW TABLES doesn't show temporary tables, so try select
// (as it can happen just in case temporary table, it should be
// fast):

View File

@ -69,7 +69,7 @@ function PMA_getHtmlForExportSelectOptions($tmp_select = '')
$is_selected = '';
}
} elseif (!empty($tmp_select)) {
if (/*overload*/mb_strpos(
if (mb_strpos(
' ' . $tmp_select,
'|' . $current_db . '|'
)) {
@ -869,7 +869,7 @@ function PMA_getHtmlForExportOptions(
$html .= PMA_getHtmlForExportOptionsFormatDropdown($export_list);
$html .= PMA_getHtmlForExportOptionsSelection($export_type, $multi_values);
$tableLength = /*overload*/mb_strlen($table);
$tableLength = mb_strlen($table);
$_table = new Table($table, $db);
if ($tableLength && empty($num_tables) && ! $_table->isMerge()) {
$html .= PMA_getHtmlForExportOptionsRows($db, $table, $unlim_num_rows);

View File

@ -301,8 +301,8 @@ function PMA_translateStacktrace($stack)
{
foreach ($stack as &$level) {
foreach ($level["context"] as &$line) {
if (/*overload*/mb_strlen($line) > 80) {
$line = /*overload*/mb_substr($line, 0, 75) . "//...";
if (mb_strlen($line) > 80) {
$line = mb_substr($line, 0, 75) . "//...";
}
}
if (preg_match("<js/get_scripts.js.php\?(.*)>", $level["url"], $matches)) {

View File

@ -19,9 +19,7 @@ use PMA\libraries\ZipFile;
function PMA_shutdownDuringExport()
{
$a = error_get_last();
if ($a != null
&& /*overload*/mb_strpos($a['message'], "execution time")
) {
if ($a != null && mb_strpos($a['message'], "execution time")) {
//write in partially downloaded file for future reference of user
print_r($a);
//set session variable to check if there was error while exporting
@ -96,7 +94,7 @@ function PMA_exportOutputHandler($line)
$dump_buffer .= $line;
if ($GLOBALS['onfly_compression']) {
$dump_buffer_len += /*overload*/mb_strlen($line);
$dump_buffer_len += mb_strlen($line);
if ($dump_buffer_len > $GLOBALS['memory_limit']) {
if ($GLOBALS['output_charset_conversion']) {
@ -146,7 +144,7 @@ function PMA_exportOutputHandler($line)
$line
);
}
if ($GLOBALS['save_on_server'] && /*overload*/mb_strlen($line) > 0) {
if ($GLOBALS['save_on_server'] && mb_strlen($line) > 0) {
$write_result = @fwrite($GLOBALS['file_handle'], $line);
// Here, use strlen rather than mb_strlen to get the length
// in bytes to compare against the number of bytes written.
@ -287,14 +285,14 @@ function PMA_getExportFilenameAndMimetype(
// Grab basic dump extension and mime type
// Check if the user already added extension;
// get the substring where the extension would be if it was included
$extension_start_pos = /*overload*/mb_strlen($filename) - /*overload*/mb_strlen(
$extension_start_pos = mb_strlen($filename) - mb_strlen(
$export_plugin->getProperties()->getExtension()
) - 1;
$user_extension = /*overload*/mb_substr(
$filename, $extension_start_pos, /*overload*/mb_strlen($filename)
$user_extension = mb_substr(
$filename, $extension_start_pos, mb_strlen($filename)
);
$required_extension = "." . $export_plugin->getProperties()->getExtension();
if (/*overload*/mb_strtolower($user_extension) != $required_extension) {
if (mb_strtolower($user_extension) != $required_extension) {
$filename .= $required_extension;
}
$mime_type = $export_plugin->getProperties()->getMimeType();
@ -374,7 +372,7 @@ function PMA_closeExportFile($file_handle, $dump_buffer, $save_filename)
fclose($file_handle);
// Here, use strlen rather than mb_strlen to get the length
// in bytes to compare against the number of bytes written.
if (/*overload*/mb_strlen($dump_buffer) > 0
if (mb_strlen($dump_buffer) > 0
&& (! $write_result || $write_result != strlen($dump_buffer))
) {
$message = new Message(
@ -555,7 +553,7 @@ function PMA_exportServer(
// Walk over databases
foreach ($GLOBALS['dblist']->databases as $current_db) {
if (isset($tmp_select)
&& /*overload*/mb_strpos(' ' . $tmp_select, '|' . $current_db . '|')
&& mb_strpos(' ' . $tmp_select, '|' . $current_db . '|')
) {
$tables = $GLOBALS['dbi']->getTables($current_db);
PMA_exportDatabase(

View File

@ -191,9 +191,9 @@ abstract class GISGeometry
$wkt = '';
if (preg_match("/^'" . $geom_types . "\(.*\)',[0-9]*$/i", $value)) {
$last_comma = /*overload*/mb_strripos($value, ",");
$srid = trim(/*overload*/mb_substr($value, $last_comma + 1));
$wkt = trim(/*overload*/mb_substr($value, 1, $last_comma - 2));
$last_comma = mb_strripos($value, ",");
$srid = trim(mb_substr($value, $last_comma + 1));
$wkt = trim(mb_substr($value, 1, $last_comma - 2));
} elseif (preg_match("/^" . $geom_types . "\(.*\)$/i", $value)) {
$wkt = $value;
}
@ -268,10 +268,10 @@ abstract class GISGeometry
}
$ol_array
= /*overload*/mb_substr(
= mb_substr(
$ol_array,
0,
/*overload*/mb_strlen($ol_array) - 2
mb_strlen($ol_array) - 2
);
$ol_array .= ')';
@ -323,10 +323,10 @@ abstract class GISGeometry
}
$ol_array
= /*overload*/mb_substr(
= mb_substr(
$ol_array,
0,
/*overload*/mb_strlen($ol_array) - 2
mb_strlen($ol_array) - 2
);
$ol_array .= ')';
@ -371,10 +371,10 @@ abstract class GISGeometry
}
$ol_array
= /*overload*/mb_substr(
= mb_substr(
$ol_array,
0,
/*overload*/mb_strlen($ol_array) - 2
mb_strlen($ol_array) - 2
);
$ol_array .= ')';

View File

@ -59,18 +59,18 @@ class GISGeometrycollection extends GISGeometry
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
= /*overload*/mb_substr(
= mb_substr(
$spatial,
19,
/*overload*/mb_strlen($spatial) - 20
mb_strlen($spatial) - 20
);
// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);
foreach ($sub_parts as $sub_part) {
$type_pos = /*overload*/mb_stripos($sub_part, '(');
$type = /*overload*/mb_substr($sub_part, 0, $type_pos);
$type_pos = mb_stripos($sub_part, '(');
$type = mb_substr($sub_part, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
if (!$gis_obj) {
@ -119,17 +119,17 @@ class GISGeometrycollection extends GISGeometry
{
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
= /*overload*/mb_substr(
= mb_substr(
$spatial,
19,
/*overload*/mb_strlen($spatial) - 20
mb_strlen($spatial) - 20
);
// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);
foreach ($sub_parts as $sub_part) {
$type_pos = /*overload*/mb_stripos($sub_part, '(');
$type = /*overload*/mb_substr($sub_part, 0, $type_pos);
$type_pos = mb_stripos($sub_part, '(');
$type = mb_substr($sub_part, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
if (!$gis_obj) {
@ -163,17 +163,17 @@ class GISGeometrycollection extends GISGeometry
{
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
= /*overload*/mb_substr(
= mb_substr(
$spatial,
19,
/*overload*/mb_strlen($spatial) - 20
mb_strlen($spatial) - 20
);
// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);
foreach ($sub_parts as $sub_part) {
$type_pos = /*overload*/mb_stripos($sub_part, '(');
$type = /*overload*/mb_substr($sub_part, 0, $type_pos);
$type_pos = mb_stripos($sub_part, '(');
$type = mb_substr($sub_part, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
if (!$gis_obj) {
@ -208,17 +208,17 @@ class GISGeometrycollection extends GISGeometry
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
= /*overload*/mb_substr(
= mb_substr(
$spatial,
19,
/*overload*/mb_strlen($spatial) - 20
mb_strlen($spatial) - 20
);
// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);
foreach ($sub_parts as $sub_part) {
$type_pos = /*overload*/mb_stripos($sub_part, '(');
$type = /*overload*/mb_substr($sub_part, 0, $type_pos);
$type_pos = mb_stripos($sub_part, '(');
$type = mb_substr($sub_part, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
if (!$gis_obj) {
@ -254,17 +254,17 @@ class GISGeometrycollection extends GISGeometry
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
= /*overload*/mb_substr(
= mb_substr(
$spatial,
19,
/*overload*/mb_strlen($spatial) - 20
mb_strlen($spatial) - 20
);
// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);
foreach ($sub_parts as $sub_part) {
$type_pos = /*overload*/mb_stripos($sub_part, '(');
$type = /*overload*/mb_substr($sub_part, 0, $type_pos);
$type_pos = mb_stripos($sub_part, '(');
$type = mb_substr($sub_part, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
if (!$gis_obj) {
@ -303,7 +303,7 @@ class GISGeometrycollection extends GISGeometry
$br_count--;
if ($br_count == 0) {
$sub_parts[]
= /*overload*/mb_substr(
= mb_substr(
$geom_col,
$start,
($count + 1 - $start)
@ -344,10 +344,10 @@ class GISGeometrycollection extends GISGeometry
}
if (isset($gis_data[0]['gis_type'])) {
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
}
$wkt .= ')';
@ -372,10 +372,10 @@ class GISGeometrycollection extends GISGeometry
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
$goem_col
= /*overload*/mb_substr(
= mb_substr(
$wkt,
19,
/*overload*/mb_strlen($wkt) - 20
mb_strlen($wkt) - 20
);
// Split the geometry collection object to get its constituents.
$sub_parts = $this->_explodeGeomCol($goem_col);
@ -383,8 +383,8 @@ class GISGeometrycollection extends GISGeometry
$i = 0;
foreach ($sub_parts as $sub_part) {
$type_pos = /*overload*/mb_stripos($sub_part, '(');
$type = /*overload*/mb_substr($sub_part, 0, $type_pos);
$type_pos = mb_stripos($sub_part, '(');
$type = mb_substr($sub_part, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
if (!$gis_obj) {
continue;

View File

@ -57,10 +57,10 @@ class GISLinestring extends GISGeometry
{
// Trim to remove leading 'LINESTRING(' and trailing ')'
$linestring
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
return $this->setMinMax($linestring, array());
@ -87,17 +87,17 @@ class GISLinestring extends GISGeometry
) {
// allocate colors
$black = imagecolorallocate($image, 0, 0, 0);
$red = hexdec(/*overload*/mb_substr($line_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($line_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($line_color, 4, 2));
$red = hexdec(mb_substr($line_color, 1, 2));
$green = hexdec(mb_substr($line_color, 3, 2));
$blue = hexdec(mb_substr($line_color, 4, 2));
$color = imagecolorallocate($image, $red, $green, $blue);
// Trim to remove leading 'LINESTRING(' and trailing ')'
$linesrting
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($linesrting, $scale_data);
@ -147,17 +147,17 @@ class GISLinestring extends GISGeometry
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
{
// allocate colors
$red = hexdec(/*overload*/mb_substr($line_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($line_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($line_color, 4, 2));
$red = hexdec(mb_substr($line_color, 1, 2));
$green = hexdec(mb_substr($line_color, 3, 2));
$blue = hexdec(mb_substr($line_color, 4, 2));
$line = array('width' => 1.5, 'color' => array($red, $green, $blue));
// Trim to remove leading 'LINESTRING(' and trailing ')'
$linesrting
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($linesrting, $scale_data);
@ -210,10 +210,10 @@ class GISLinestring extends GISGeometry
// Trim to remove leading 'LINESTRING(' and trailing ')'
$linesrting
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($linesrting, $scale_data);
@ -258,10 +258,10 @@ class GISLinestring extends GISGeometry
// Trim to remove leading 'LINESTRING(' and trailing ')'
$linesrting
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($linesrting, null);
@ -300,10 +300,10 @@ class GISLinestring extends GISGeometry
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -334,10 +334,10 @@ class GISLinestring extends GISGeometry
// Trim to remove leading 'LINESTRING(' and trailing ')'
$linestring
= /*overload*/mb_substr(
= mb_substr(
$wkt,
11,
/*overload*/mb_strlen($wkt) - 12
mb_strlen($wkt) - 12
);
$points_arr = $this->extractPoints($linestring, null);

View File

@ -59,10 +59,10 @@ class GISMultilinestring extends GISGeometry
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
$multilinestirng
= /*overload*/mb_substr(
= mb_substr(
$spatial,
17,
/*overload*/mb_strlen($spatial) - 19
mb_strlen($spatial) - 19
);
// Separate each linestring
$linestirngs = explode("),(", $multilinestirng);
@ -95,17 +95,17 @@ class GISMultilinestring extends GISGeometry
) {
// allocate colors
$black = imagecolorallocate($image, 0, 0, 0);
$red = hexdec(/*overload*/mb_substr($line_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($line_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($line_color, 4, 2));
$red = hexdec(mb_substr($line_color, 1, 2));
$green = hexdec(mb_substr($line_color, 3, 2));
$blue = hexdec(mb_substr($line_color, 4, 2));
$color = imagecolorallocate($image, $red, $green, $blue);
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
$multilinestirng
= /*overload*/mb_substr(
= mb_substr(
$spatial,
17,
/*overload*/mb_strlen($spatial) - 19
mb_strlen($spatial) - 19
);
// Separate each linestring
$linestirngs = explode("),(", $multilinestirng);
@ -162,17 +162,17 @@ class GISMultilinestring extends GISGeometry
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
{
// allocate colors
$red = hexdec(/*overload*/mb_substr($line_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($line_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($line_color, 4, 2));
$red = hexdec(mb_substr($line_color, 1, 2));
$green = hexdec(mb_substr($line_color, 3, 2));
$blue = hexdec(mb_substr($line_color, 4, 2));
$line = array('width' => 1.5, 'color' => array($red, $green, $blue));
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
$multilinestirng
= /*overload*/mb_substr(
= mb_substr(
$spatial,
17,
/*overload*/mb_strlen($spatial) - 19
mb_strlen($spatial) - 19
);
// Separate each linestring
$linestirngs = explode("),(", $multilinestirng);
@ -231,10 +231,10 @@ class GISMultilinestring extends GISGeometry
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
$multilinestirng
= /*overload*/mb_substr(
= mb_substr(
$spatial,
17,
/*overload*/mb_strlen($spatial) - 19
mb_strlen($spatial) - 19
);
// Separate each linestring
$linestirngs = explode("),(", $multilinestirng);
@ -286,10 +286,10 @@ class GISMultilinestring extends GISGeometry
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
$multilinestirng
= /*overload*/mb_substr(
= mb_substr(
$spatial,
17,
/*overload*/mb_strlen($spatial) - 19
mb_strlen($spatial) - 19
);
// Separate each linestring
$linestirngs = explode("),(", $multilinestirng);
@ -339,17 +339,17 @@ class GISMultilinestring extends GISGeometry
? $data_row[$i][$j]['y'] : $empty) . ',';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0, /*overload*/mb_strlen($wkt) - 1
0, mb_strlen($wkt) - 1
);
$wkt .= '),';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -373,18 +373,18 @@ class GISMultilinestring extends GISGeometry
$wkt .= $point['x'] . ' ' . $point['y'] . ',';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= '),';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -415,10 +415,10 @@ class GISMultilinestring extends GISGeometry
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
$multilinestirng
= /*overload*/mb_substr(
= mb_substr(
$wkt,
17,
/*overload*/mb_strlen($wkt) - 19
mb_strlen($wkt) - 19
);
// Separate each linestring
$linestirngs = explode("),(", $multilinestirng);

View File

@ -57,10 +57,10 @@ class GISMultipoint extends GISGeometry
{
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
$multipoint
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
return $this->setMinMax($multipoint, array());
@ -87,17 +87,17 @@ class GISMultipoint extends GISGeometry
) {
// allocate colors
$black = imagecolorallocate($image, 0, 0, 0);
$red = hexdec(/*overload*/mb_substr($point_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($point_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($point_color, 4, 2));
$red = hexdec(mb_substr($point_color, 1, 2));
$green = hexdec(mb_substr($point_color, 3, 2));
$blue = hexdec(mb_substr($point_color, 4, 2));
$color = imagecolorallocate($image, $red, $green, $blue);
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
$multipoint
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($multipoint, $scale_data);
@ -144,17 +144,17 @@ class GISMultipoint extends GISGeometry
$pdf
) {
// allocate colors
$red = hexdec(/*overload*/mb_substr($point_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($point_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($point_color, 4, 2));
$red = hexdec(mb_substr($point_color, 1, 2));
$green = hexdec(mb_substr($point_color, 3, 2));
$blue = hexdec(mb_substr($point_color, 4, 2));
$line = array('width' => 1.25, 'color' => array($red, $green, $blue));
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
$multipoint
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($multipoint, $scale_data);
@ -199,10 +199,10 @@ class GISMultipoint extends GISGeometry
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
$multipoint
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($multipoint, $scale_data);
@ -258,10 +258,10 @@ class GISMultipoint extends GISGeometry
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
$multipoint
= /*overload*/mb_substr(
= mb_substr(
$spatial,
11,
/*overload*/mb_strlen($spatial) - 12
mb_strlen($spatial) - 12
);
$points_arr = $this->extractPoints($multipoint, null);
@ -301,10 +301,10 @@ class GISMultipoint extends GISGeometry
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -328,10 +328,10 @@ class GISMultipoint extends GISGeometry
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -362,10 +362,10 @@ class GISMultipoint extends GISGeometry
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
$points
= /*overload*/mb_substr(
= mb_substr(
$wkt,
11,
/*overload*/mb_strlen($wkt) - 12
mb_strlen($wkt) - 12
);
$points_arr = $this->extractPoints($points, null);
@ -398,9 +398,9 @@ class GISMultipoint extends GISGeometry
}
}
$olArrayLength = /*overload*/mb_strlen($ol_array);
if (/*overload*/mb_substr($ol_array, $olArrayLength - 2) == ', ') {
$ol_array = /*overload*/mb_substr($ol_array, 0, $olArrayLength - 2);
$olArrayLength = mb_strlen($ol_array);
if (mb_substr($ol_array, $olArrayLength - 2) == ', ') {
$ol_array = mb_substr($ol_array, 0, $olArrayLength - 2);
}
$ol_array .= ')';

View File

@ -59,17 +59,17 @@ class GISMultipolygon extends GISGeometry
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
$multipolygon
= /*overload*/mb_substr(
= mb_substr(
$spatial,
15,
/*overload*/mb_strlen($spatial) - 18
mb_strlen($spatial) - 18
);
// Separate each polygon
$polygons = explode(")),((", $multipolygon);
foreach ($polygons as $polygon) {
// If the polygon doesn't have an inner ring, use polygon itself
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$ring = $polygon;
} else {
// Separate outer ring and use it to determine min-max
@ -103,17 +103,17 @@ class GISMultipolygon extends GISGeometry
) {
// allocate colors
$black = imagecolorallocate($image, 0, 0, 0);
$red = hexdec(/*overload*/mb_substr($fill_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($fill_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($fill_color, 4, 2));
$red = hexdec(mb_substr($fill_color, 1, 2));
$green = hexdec(mb_substr($fill_color, 3, 2));
$blue = hexdec(mb_substr($fill_color, 4, 2));
$color = imagecolorallocate($image, $red, $green, $blue);
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
$multipolygon
= /*overload*/mb_substr(
= mb_substr(
$spatial,
15,
/*overload*/mb_strlen($spatial) - 18
mb_strlen($spatial) - 18
);
// Separate each polygon
$polygons = explode(")),((", $multipolygon);
@ -121,7 +121,7 @@ class GISMultipolygon extends GISGeometry
$first_poly = true;
foreach ($polygons as $polygon) {
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$points_arr = $this->extractPoints($polygon, $scale_data, true);
} else {
// Separate outer and inner polygons
@ -176,17 +176,17 @@ class GISMultipolygon extends GISGeometry
public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf)
{
// allocate colors
$red = hexdec(/*overload*/mb_substr($fill_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($fill_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($fill_color, 4, 2));
$red = hexdec(mb_substr($fill_color, 1, 2));
$green = hexdec(mb_substr($fill_color, 3, 2));
$blue = hexdec(mb_substr($fill_color, 4, 2));
$color = array($red, $green, $blue);
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
$multipolygon
= /*overload*/mb_substr(
= mb_substr(
$spatial,
15,
/*overload*/mb_strlen($spatial) - 18
mb_strlen($spatial) - 18
);
// Separate each polygon
$polygons = explode(")),((", $multipolygon);
@ -194,7 +194,7 @@ class GISMultipolygon extends GISGeometry
$first_poly = true;
foreach ($polygons as $polygon) {
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$points_arr = $this->extractPoints($polygon, $scale_data, true);
} else {
// Separate outer and inner polygons
@ -257,10 +257,10 @@ class GISMultipolygon extends GISGeometry
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
$multipolygon
= /*overload*/mb_substr(
= mb_substr(
$spatial,
15,
/*overload*/mb_strlen($spatial) - 18
mb_strlen($spatial) - 18
);
// Separate each polygon
$polygons = explode(")),((", $multipolygon);
@ -269,7 +269,7 @@ class GISMultipolygon extends GISGeometry
$row .= '<path d="';
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$row .= $this->_drawPath($polygon, $scale_data);
} else {
// Separate outer and inner polygons
@ -324,10 +324,10 @@ class GISMultipolygon extends GISGeometry
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
$multipolygon
= /*overload*/mb_substr(
= mb_substr(
$spatial,
15,
/*overload*/mb_strlen($spatial) - 18
mb_strlen($spatial) - 18
);
// Separate each polygon
$polygons = explode(")),((", $multipolygon);
@ -407,26 +407,26 @@ class GISMultipolygon extends GISGeometry
? $data_row[$k][$i][$j]['y'] : $empty) . ',';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= '),';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= '),';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -498,10 +498,10 @@ class GISMultipolygon extends GISGeometry
$wkt .= $point['x'] . ' ' . $point['y'] . ',';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')'; // end of outer ring
@ -513,10 +513,10 @@ class GISMultipolygon extends GISGeometry
$wkt .= $innerPoint['x'] . ' ' . $innerPoint['y'] . ',';
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')'; // end of inner ring
}
@ -525,10 +525,10 @@ class GISMultipolygon extends GISGeometry
$wkt .= '),'; // end of polygon
}
$wkt
= /*overload*/mb_substr(
= mb_substr(
$wkt,
0,
/*overload*/mb_strlen($wkt) - 1
mb_strlen($wkt) - 1
);
$wkt .= ')'; // end of multipolygon
@ -559,10 +559,10 @@ class GISMultipolygon extends GISGeometry
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
$multipolygon
= /*overload*/mb_substr(
= mb_substr(
$wkt,
15,
/*overload*/mb_strlen($wkt) - 18
mb_strlen($wkt) - 18
);
// Separate each polygon
$polygons = explode(")),((", $multipolygon);
@ -573,7 +573,7 @@ class GISMultipolygon extends GISGeometry
$k = 0;
foreach ($polygons as $polygon) {
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$param_row[$k]['no_of_lines'] = 1;
$points_arr = $this->extractPoints($polygon, null);
$no_of_points = count($points_arr);

View File

@ -57,10 +57,10 @@ class GISPoint extends GISGeometry
{
// Trim to remove leading 'POINT(' and trailing ')'
$point
= /*overload*/mb_substr(
= mb_substr(
$spatial,
6,
/*overload*/mb_strlen($spatial) - 7
mb_strlen($spatial) - 7
);
return $this->setMinMax($point, array());
@ -87,17 +87,17 @@ class GISPoint extends GISGeometry
) {
// allocate colors
$black = imagecolorallocate($image, 0, 0, 0);
$red = hexdec(/*overload*/mb_substr($point_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($point_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($point_color, 4, 2));
$red = hexdec(mb_substr($point_color, 1, 2));
$green = hexdec(mb_substr($point_color, 3, 2));
$blue = hexdec(mb_substr($point_color, 4, 2));
$color = imagecolorallocate($image, $red, $green, $blue);
// Trim to remove leading 'POINT(' and trailing ')'
$point
= /*overload*/mb_substr(
= mb_substr(
$spatial,
6,
/*overload*/mb_strlen($spatial) - 7
mb_strlen($spatial) - 7
);
$points_arr = $this->extractPoints($point, $scale_data);
@ -149,17 +149,17 @@ class GISPoint extends GISGeometry
$pdf
) {
// allocate colors
$red = hexdec(/*overload*/mb_substr($point_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($point_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($point_color, 4, 2));
$red = hexdec(mb_substr($point_color, 1, 2));
$green = hexdec(mb_substr($point_color, 3, 2));
$blue = hexdec(mb_substr($point_color, 4, 2));
$line = array('width' => 1.25, 'color' => array($red, $green, $blue));
// Trim to remove leading 'POINT(' and trailing ')'
$point
= /*overload*/mb_substr(
= mb_substr(
$spatial,
6,
/*overload*/mb_strlen($spatial) - 7
mb_strlen($spatial) - 7
);
$points_arr = $this->extractPoints($point, $scale_data);
@ -209,10 +209,10 @@ class GISPoint extends GISGeometry
// Trim to remove leading 'POINT(' and trailing ')'
$point
= /*overload*/mb_substr(
= mb_substr(
$spatial,
6,
/*overload*/mb_strlen($spatial) - 7
mb_strlen($spatial) - 7
);
$points_arr = $this->extractPoints($point, $scale_data);
@ -265,10 +265,10 @@ class GISPoint extends GISGeometry
// Trim to remove leading 'POINT(' and trailing ')'
$point
= /*overload*/mb_substr(
= mb_substr(
$spatial,
6,
/*overload*/mb_strlen($spatial) - 7
mb_strlen($spatial) - 7
);
$points_arr = $this->extractPoints($point, null);
@ -341,10 +341,10 @@ class GISPoint extends GISGeometry
// Trim to remove leading 'POINT(' and trailing ')'
$point
= /*overload*/mb_substr(
= mb_substr(
$wkt,
6,
/*overload*/mb_strlen($wkt) - 7
mb_strlen($wkt) - 7
);
$points_arr = $this->extractPoints($point, null);

View File

@ -56,15 +56,14 @@ class GISPolygon extends GISGeometry
public function scaleRow($spatial)
{
// Trim to remove leading 'POLYGON((' and trailing '))'
$polygon
= /*overload*/mb_substr(
$spatial,
9,
/*overload*/mb_strlen($spatial) - 11
);
$polygon = mb_substr(
$spatial,
9,
mb_strlen($spatial) - 11
);
// If the polygon doesn't have an inner ring, use polygon itself
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$ring = $polygon;
} else {
// Separate outer ring and use it to determine min-max
@ -96,23 +95,21 @@ class GISPolygon extends GISGeometry
) {
// allocate colors
$black = imagecolorallocate($image, 0, 0, 0);
$red = hexdec(/*overload*/mb_substr($fill_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($fill_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($fill_color, 4, 2));
$red = hexdec(mb_substr($fill_color, 1, 2));
$green = hexdec(mb_substr($fill_color, 3, 2));
$blue = hexdec(mb_substr($fill_color, 4, 2));
$color = imagecolorallocate($image, $red, $green, $blue);
// Trim to remove leading 'POLYGON((' and trailing '))'
$polygon
= /*overload*/
mb_substr(
$spatial,
9,
/*overload*/
mb_strlen($spatial) - 11
);
$polygon = mb_substr(
$spatial,
9,
mb_strlen($spatial) - 11
);
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$points_arr = $this->extractPoints($polygon, $scale_data, true);
} else {
// Separate outer and inner polygons
@ -162,20 +159,20 @@ class GISPolygon extends GISGeometry
public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf)
{
// allocate colors
$red = hexdec(/*overload*/mb_substr($fill_color, 1, 2));
$green = hexdec(/*overload*/mb_substr($fill_color, 3, 2));
$blue = hexdec(/*overload*/mb_substr($fill_color, 4, 2));
$red = hexdec(mb_substr($fill_color, 1, 2));
$green = hexdec(mb_substr($fill_color, 3, 2));
$blue = hexdec(mb_substr($fill_color, 4, 2));
$color = array($red, $green, $blue);
// Trim to remove leading 'POLYGON((' and trailing '))'
$polygon = /*overload*/mb_substr(
$polygon = mb_substr(
$spatial,
9,
/*overload*/mb_strlen($spatial) - 11
mb_strlen($spatial) - 11
);
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$points_arr = $this->extractPoints($polygon, $scale_data, true);
} else {
// Separate outer and inner polygons
@ -231,16 +228,16 @@ class GISPolygon extends GISGeometry
// Trim to remove leading 'POLYGON((' and trailing '))'
$polygon
= /*overload*/mb_substr(
= mb_substr(
$spatial,
9,
/*overload*/mb_strlen($spatial) - 11
mb_strlen($spatial) - 11
);
$row = '<path d="';
// If the polygon doesn't have an inner polygon
if (/*overload*/mb_strpos($polygon, "),(") === false) {
if (mb_strpos($polygon, "),(") === false) {
$row .= $this->_drawPath($polygon, $scale_data);
} else {
// Separate outer and inner polygons
@ -294,11 +291,11 @@ class GISPolygon extends GISGeometry
// Trim to remove leading 'POLYGON((' and trailing '))'
$polygon
= /*overload*/
=
mb_substr(
$spatial,
9,
/*overload*/
mb_strlen($spatial) - 11
);
@ -369,19 +366,19 @@ class GISPolygon extends GISGeometry
? $gis_data[$index]['POLYGON'][$i][$j]['y'] : $empty) . ',';
}
$wkt
= /*overload*/
=
mb_substr(
$wkt,
0, /*overload*/
0,
mb_strlen($wkt) - 1
);
$wkt .= '),';
}
$wkt
= /*overload*/
=
mb_substr(
$wkt,
0, /*overload*/
0,
mb_strlen($wkt) - 1
);
$wkt .= ')';
@ -599,10 +596,10 @@ class GISPolygon extends GISGeometry
// Trim to remove leading 'POLYGON((' and trailing '))'
$polygon
= /*overload*/
=
mb_substr(
$wkt,
9, /*overload*/
9,
mb_strlen($wkt) - 11
);
// Separate each linestring

View File

@ -251,16 +251,15 @@ class GISVisualization
// Check if the user already added extension;
// get the substring where the extension would be if it was included
$extension_start_pos
= /*overload*/mb_strlen($file_name) - /*overload*/mb_strlen($ext) - 1;
$extension_start_pos = mb_strlen($file_name) - mb_strlen($ext) - 1;
$user_extension
= /*overload*/mb_substr(
= mb_substr(
$file_name,
$extension_start_pos,
/*overload*/mb_strlen($file_name)
mb_strlen($file_name)
);
$required_extension = "." . $ext;
if (/*overload*/mb_strtolower($user_extension) != $required_extension) {
if (mb_strtolower($user_extension) != $required_extension) {
$file_name .= $required_extension;
}
@ -548,10 +547,10 @@ class GISVisualization
// Figure out the data type
$ref_data = $row[$this->_settings['spatialColumn']];
$type_pos
= /*overload*/
=
mb_stripos($ref_data, '(');
$type
= /*overload*/
=
mb_substr($ref_data, 0, $type_pos);
$gis_obj = GISFactory::factory($type);
@ -638,10 +637,10 @@ class GISVisualization
// Figure out the data type
$ref_data = $row[$this->_settings['spatialColumn']];
$type_pos
= /*overload*/
=
mb_stripos($ref_data, '(');
$type
= /*overload*/
=
mb_substr($ref_data, 0, $type_pos);
$gis_obj = GISFactory::factory($type);

View File

@ -76,8 +76,8 @@ function PMA_convertAIXMapCharsets($in_charset, $out_charset)
global $gnu_iconv_to_aix_iconv_codepage_map;
// Check for transliteration argument at the end of output character set name
$translit_search = /*overload*/mb_strpos(
/*overload*/mb_strtolower($out_charset),
$translit_search = mb_strpos(
mb_strtolower($out_charset),
'//translit'
);
$using_translit = (!($translit_search === false));
@ -85,28 +85,28 @@ function PMA_convertAIXMapCharsets($in_charset, $out_charset)
// Extract "plain" output character set name
// (without any transliteration argument)
$out_charset_plain = ($using_translit
? /*overload*/mb_substr($out_charset, 0, $translit_search)
? mb_substr($out_charset, 0, $translit_search)
: $out_charset);
// Transform name of input character set (if found)
$in_charset_exisits = array_key_exists(
/*overload*/mb_strtolower($in_charset),
mb_strtolower($in_charset),
$gnu_iconv_to_aix_iconv_codepage_map
);
if ($in_charset_exisits) {
$in_charset = $gnu_iconv_to_aix_iconv_codepage_map[
/*overload*/mb_strtolower($in_charset)
mb_strtolower($in_charset)
];
}
// Transform name of "plain" output character set (if found)
$out_charset_plain_exists = array_key_exists(
/*overload*/mb_strtolower($out_charset_plain),
mb_strtolower($out_charset_plain),
$gnu_iconv_to_aix_iconv_codepage_map
);
if ($out_charset_plain_exists) {
$out_charset_plain = $gnu_iconv_to_aix_iconv_codepage_map[
/*overload*/mb_strtolower($out_charset_plain)
mb_strtolower($out_charset_plain)
];
}

View File

@ -84,8 +84,7 @@ function PMA_executeQuery($sql, $full, &$sql_data)
// USE query changes the database, son need to track
// while running multiple queries
$is_use_query
= /*overload*/mb_stripos($sql, "use ") !== false;
$is_use_query = mb_stripos($sql, "use ") !== false;
$msg = '# ';
if ($result === false) { // execution failed
@ -193,7 +192,7 @@ function PMA_importRunQuery($sql = '', $full = '', &$sql_data = array())
$max_sql_len = max(
$max_sql_len,
/*overload*/mb_strlen($import_run_buffer['sql'])
mb_strlen($import_run_buffer['sql'])
);
if (! $sql_query_disabled) {
$sql_query .= $import_run_buffer['full'];
@ -273,7 +272,7 @@ function PMA_importRunQuery($sql = '', $full = '', &$sql_data = array())
// the complete query in the textarea)
if (! $go_sql && $run_query) {
if (! empty($sql_query)) {
if (/*overload*/mb_strlen($sql_query) > 50000
if (mb_strlen($sql_query) > 50000
|| $executed_queries > 50
|| $max_sql_len > 1000
) {
@ -376,14 +375,13 @@ function PMA_importGetNextChunk($size = 32768)
if ($GLOBALS['import_file'] == 'none') {
// Well this is not yet supported and tested,
// but should return content of textarea
if (/*overload*/mb_strlen($GLOBALS['import_text']) < $size) {
if (mb_strlen($GLOBALS['import_text']) < $size) {
$GLOBALS['finished'] = true;
return $GLOBALS['import_text'];
} else {
$r = /*overload*/mb_substr($GLOBALS['import_text'], 0, $size);
$r = mb_substr($GLOBALS['import_text'], 0, $size);
$GLOBALS['offset'] += $size;
$GLOBALS['import_text'] = /*overload*/
mb_substr($GLOBALS['import_text'], $size);
$GLOBALS['import_text'] = mb_substr($GLOBALS['import_text'], $size);
return $r;
}
}
@ -398,8 +396,8 @@ function PMA_importGetNextChunk($size = 32768)
$GLOBALS['finished'] = feof($import_handle);
break;
case 'application/zip':
$result = /*overload*/mb_substr($GLOBALS['import_text'], 0, $size);
$GLOBALS['import_text'] = /*overload*/mb_substr(
$result = mb_substr($GLOBALS['import_text'], 0, $size);
$GLOBALS['import_text'] = mb_substr(
$GLOBALS['import_text'],
$size
);
@ -426,12 +424,12 @@ function PMA_importGetNextChunk($size = 32768)
if ($GLOBALS['offset'] == $size) {
// UTF-8
if (strncmp($result, "\xEF\xBB\xBF", 3) == 0) {
$result = /*overload*/mb_substr($result, 3);
$result = mb_substr($result, 3);
// UTF-16 BE, LE
} elseif (strncmp($result, "\xFE\xFF", 2) == 0
|| strncmp($result, "\xFF\xFE", 2) == 0
) {
$result = /*overload*/mb_substr($result, 2);
$result = mb_substr($result, 2);
}
}
return $result;
@ -486,10 +484,10 @@ function PMA_getColumnAlphaName($num)
if ($num == 0) {
// use 'Z' if column number is 0,
// this is necessary because A-Z has no 'zero'
$col_name .= /*overload*/mb_chr(($A + 26) - 1);
$col_name .= mb_chr(($A + 26) - 1);
} else {
// convert column number to ASCII character
$col_name .= /*overload*/mb_chr(($A + $num) - 1);
$col_name .= mb_chr(($A + $num) - 1);
}
return $col_name;
@ -515,8 +513,8 @@ function PMA_getColumnNumberFromName($name)
return 0;
}
$name = /*overload*/mb_strtoupper($name);
$num_chars = /*overload*/mb_strlen($name);
$name = mb_strtoupper($name);
$num_chars = mb_strlen($name);
$column_number = 0;
for ($i = 0; $i < $num_chars; ++$i) {
// read string from back to front
@ -526,7 +524,7 @@ function PMA_getColumnNumberFromName($name)
// and subtract 64 to get corresponding decimal value
// ASCII value of "A" is 65, "B" is 66, etc.
// Decimal equivalent of "A" is 1, "B" is 2, etc.
$number = (int)(/*overload*/mb_ord($name[$char_pos]) - 64);
$number = (int)(mb_ord($name[$char_pos]) - 64);
// base26 to base10 conversion : multiply each number
// with corresponding value of the position, in this case
@ -609,8 +607,8 @@ function PMA_getDecimalScale($last_cumulative_size)
*/
function PMA_getDecimalSize($cell)
{
$curr_size = /*overload*/mb_strlen((string)$cell);
$decPos = /*overload*/mb_strpos($cell, ".");
$curr_size = mb_strlen((string)$cell);
$decPos = mb_strpos($cell, ".");
$decPrecision = ($curr_size - 1) - $decPos;
$m = $curr_size - 1;
@ -637,7 +635,7 @@ function PMA_getDecimalSize($cell)
function PMA_detectSize($last_cumulative_size, $last_cumulative_type,
$curr_type, $cell
) {
$curr_size = /*overload*/mb_strlen((string)$cell);
$curr_size = mb_strlen((string)$cell);
/**
* If the cell is NULL, don't treat it as a varchar
@ -775,7 +773,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type,
$oldM = PMA_getDecimalPrecision($last_cumulative_size);
$oldD = PMA_getDecimalScale($last_cumulative_size);
$oldInt = $oldM - $oldD;
$newInt = /*overload*/mb_strlen((string)$cell);
$newInt = mb_strlen((string)$cell);
/* See which has the larger integer length */
if ($oldInt >= $newInt) {
@ -853,8 +851,8 @@ function PMA_detectType($last_cumulative_type, $cell)
}
if ($cell == (string)(float)$cell
&& /*overload*/mb_strpos($cell, ".") !== false
&& /*overload*/mb_substr_count($cell, ".") == 1
&& mb_strpos($cell, ".") !== false
&& mb_substr_count($cell, ".") == 1
) {
return DECIMAL;
}

View File

@ -320,7 +320,7 @@ function PMA_getColumnTitle($column, $comments_map)
function PMA_isColumn($column, $types)
{
foreach ($types as $one_type) {
if (/*overload*/mb_stripos($column['Type'], $one_type) === 0) {
if (mb_stripos($column['Type'], $one_type) === 0) {
return true;
}
}
@ -395,8 +395,8 @@ function PMA_getFunctionColumn($column, $is_upload, $column_name_appendix,
&& $column['is_binary'])
) {
$html_output .= '<td class="center">' . __('Binary') . '</td>' . "\n";
} elseif (/*overload*/mb_strstr($column['True_Type'], 'enum')
|| /*overload*/mb_strstr($column['True_Type'], 'set')
} elseif (mb_strstr($column['True_Type'], 'enum')
|| mb_strstr($column['True_Type'], 'set')
|| in_array($column['pma_type'], $no_support_types)
) {
$html_output .= '<td class="center">--</td>' . "\n";
@ -484,13 +484,13 @@ function PMA_getNullColumn($column, $column_name_appendix, $real_null_value,
function PMA_getNullifyCodeForNullColumn($column, $foreigners, $foreignData)
{
$foreigner = PMA_searchColumnInForeigners($foreigners, $column['Field']);
if (/*overload*/mb_strstr($column['True_Type'], 'enum')) {
if (/*overload*/mb_strlen($column['Type']) > 20) {
if (mb_strstr($column['True_Type'], 'enum')) {
if (mb_strlen($column['Type']) > 20) {
$nullify_code = '1';
} else {
$nullify_code = '2';
}
} elseif (/*overload*/mb_strstr($column['True_Type'], 'set')) {
} elseif (mb_strstr($column['True_Type'], 'set')) {
$nullify_code = '3';
} elseif (!empty($foreigners)
&& !empty($foreigner)
@ -573,7 +573,7 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
);
} elseif ($GLOBALS['cfg']['LongtextDoubleTextarea']
&& /*overload*/mb_strstr($column['pma_type'], 'longtext')
&& mb_strstr($column['pma_type'], 'longtext')
) {
$html_output = '&nbsp;</td>';
$html_output .= '</tr>';
@ -585,7 +585,7 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
$special_chars_encoded, $data_type
);
} elseif (/*overload*/mb_strstr($column['pma_type'], 'text')) {
} elseif (mb_strstr($column['pma_type'], 'text')) {
$html_output .= PMA_getTextarea(
$column, $backup_field, $column_name_appendix, $onChangeClause,
@ -593,7 +593,7 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
$special_chars_encoded, $data_type
);
$html_output .= "\n";
if (/*overload*/mb_strlen($special_chars) > 32000) {
if (mb_strlen($special_chars) > 32000) {
$html_output .= "</td>\n";
$html_output .= '<td>' . __(
'Because of its length,<br /> this column might not be editable.'
@ -765,7 +765,7 @@ function PMA_getTextarea($column, $backup_field, $column_name_appendix,
);
$maxlength = $extracted_columnspec['spec_in_brackets'];
} elseif ($GLOBALS['cfg']['LongtextDoubleTextarea']
&& /*overload*/mb_strstr($column['pma_type'], 'longtext')
&& mb_strstr($column['pma_type'], 'longtext')
) {
$textAreaRows = $GLOBALS['cfg']['TextareaRows'] * 2;
$textareaCols = $GLOBALS['cfg']['TextareaCols'] * 2;
@ -818,7 +818,7 @@ function PMA_getPmaTypeEnum($column, $backup_field, $column_name_appendix,
$html_output .= '<input type="hidden" name="fields_type'
. $column_name_appendix . '" value="enum" />';
$html_output .= "\n" . ' ' . $backup_field . "\n";
if (/*overload*/mb_strlen($column['Type']) > 20) {
if (mb_strlen($column['Type']) > 20) {
$html_output .= PMA_getDropDownDependingOnLength(
$column, $column_name_appendix, $onChangeClause,
$tabindex, $tabindex_for_value, $idindex, $data, $column_enum_values
@ -1051,7 +1051,7 @@ function PMA_getBinaryAndBlobColumn(
$html_output .= __('Binary - do not edit');
if (isset($data)) {
$data_size = PMA\libraries\Util::formatByteDown(
/*overload*/mb_strlen(stripslashes($data)), 3, 1
mb_strlen(stripslashes($data)), 3, 1
);
$html_output .= ' (' . $data_size[0] . ' ' . $data_size[1] . ')';
unset($data_size);
@ -1263,7 +1263,7 @@ function PMA_getValueColumnForOtherDatatypes($column, $default_char_editing,
$html_output = $backup_field . "\n";
if ($column['is_char']
&& ($GLOBALS['cfg']['CharEditing'] == 'textarea'
|| /*overload*/mb_strpos($data, "\n") !== false)
|| mb_strpos($data, "\n") !== false)
) {
$html_output .= "\n";
$GLOBALS['cfg']['CharEditing'] = $default_char_editing;
@ -1628,7 +1628,7 @@ function PMA_getSpecialCharsAndBackupFieldForExistingRow(
} elseif ((substr($column['True_Type'], 0, 9) == 'timestamp'
|| $column['True_Type'] == 'datetime'
|| $column['True_Type'] == 'time')
&& (/*overload*/mb_strpos($current_row[$column['Field']], ".") !== false)
&& (mb_strpos($current_row[$column['Field']], ".") !== false)
) {
$current_row[$column['Field']] = $as_is
? $current_row[$column['Field']]
@ -1671,7 +1671,7 @@ function PMA_getSpecialCharsAndBackupFieldForExistingRow(
&& $_REQUEST['default_action'] === 'insert'
) {
if ($column['Key'] === 'PRI'
&& /*overload*/mb_strpos($column['Extra'], 'auto_increment') !== false
&& mb_strpos($column['Extra'], 'auto_increment') !== false
) {
$data = $special_chars_encoded = $special_chars = null;
}
@ -1856,13 +1856,13 @@ function PMA_getGotoInclude($goto_include)
$goto_include = $GLOBALS['goto'];
}
if ($GLOBALS['goto'] == 'db_sql.php'
&& /*overload*/mb_strlen($GLOBALS['table'])
&& mb_strlen($GLOBALS['table'])
) {
$GLOBALS['table'] = '';
}
}
if (! $goto_include) {
if (! /*overload*/mb_strlen($GLOBALS['table'])) {
if (! mb_strlen($GLOBALS['table'])) {
$goto_include = 'db_sql.php';
} else {
$goto_include = 'tbl_sql.php';
@ -2019,7 +2019,7 @@ function PMA_getDisplayValueForForeignTableColumn($where_comparison,
$foreigner['foreign_table']
);
// Field to display from the foreign table?
if (isset($display_field) && /*overload*/mb_strlen($display_field)) {
if (isset($display_field) && mb_strlen($display_field)) {
$dispsql = 'SELECT ' . PMA\libraries\Util::backquote($display_field)
. ' FROM ' . PMA\libraries\Util::backquote($foreigner['foreign_db'])
. '.' . PMA\libraries\Util::backquote($foreigner['foreign_table'])
@ -2172,7 +2172,7 @@ function PMA_getCurrentValueAsAnArrayForMultipleEdit( $multi_edit_funcs,
|| in_array($multi_edit_funcs[$key], $gis_from_wkb_functions)
) {
// Remove enclosing apostrophes
$current_value = /*overload*/mb_substr($current_value, 1, -1);
$current_value = mb_substr($current_value, 1, -1);
// Remove escaping apostrophes
$current_value = str_replace("''", "'", $current_value);
return $multi_edit_funcs[$key] . '(' . $current_value . ')';
@ -2226,7 +2226,7 @@ function PMA_getQueryValuesForInsertAndUpdateInMultipleEdit($multi_edit_columns_
// i n s e r t
if ($is_insert) {
// no need to add column into the valuelist
if (/*overload*/mb_strlen($current_value_as_an_array)) {
if (mb_strlen($current_value_as_an_array)) {
$query_values[] = $current_value_as_an_array;
// first inserted row so prepare the list of fields
if (empty($value_sets)) {
@ -2313,7 +2313,7 @@ function PMA_getCurrentValueForDifferentTypes($possibly_uploaded_val, $key,
}
if ($type != 'protected' && $type != 'set'
&& 0 === /*overload*/mb_strlen($current_value)
&& 0 === mb_strlen($current_value)
) {
// best way to avoid problems in strict mode
// (works also in non-strict mode)
@ -2591,7 +2591,7 @@ function PMA_getHtmlForFunctionOption($odd_row, $column, $column_name_appendix)
return '<tr class="noclick ' . ($odd_row ? 'odd' : 'even' ) . '">'
. '<td '
. ($longDoubleTextArea
&& /*overload*/mb_strstr($column['True_Type'], 'longtext')
&& mb_strstr($column['True_Type'], 'longtext')
? 'rowspan="2"'
: ''
)

View File

@ -62,8 +62,8 @@ function PMA_getIp()
*/
function PMA_ipMaskTest($testRange, $ipToTest)
{
if (/*overload*/mb_strpos($testRange, ':') > -1
|| /*overload*/mb_strpos($ipToTest, ':') > -1
if (mb_strpos($testRange, ':') > -1
|| mb_strpos($ipToTest, ':') > -1
) {
// assume IPv6
$result = PMA_ipv6MaskTest($testRange, $ipToTest);
@ -176,11 +176,11 @@ function PMA_ipv6MaskTest($test_range, $ip_to_test)
$result = true;
// convert to lowercase for easier comparison
$test_range = /*overload*/mb_strtolower($test_range);
$ip_to_test = /*overload*/mb_strtolower($ip_to_test);
$test_range = mb_strtolower($test_range);
$ip_to_test = mb_strtolower($ip_to_test);
$is_cidr = /*overload*/mb_strpos($test_range, '/') > -1;
$is_range = /*overload*/mb_strpos($test_range, '[') > -1;
$is_cidr = mb_strpos($test_range, '/') > -1;
$is_range = mb_strpos($test_range, '[') > -1;
$is_single = ! $is_cidr && ! $is_range;
$ip_hex = bin2hex(inet_pton($ip_to_test));
@ -229,7 +229,7 @@ function PMA_ipv6MaskTest($test_range, $ip_to_test)
$pos = 31;
while ($flexbits > 0) {
// Get the character at this position
$orig = /*overload*/mb_substr($last_hex, $pos, 1);
$orig = mb_substr($last_hex, $pos, 1);
// Convert it to an integer
$origval = hexdec($orig);

View File

@ -16,14 +16,14 @@
*/
function PMA_detectMIME(&$test)
{
$len = /*overload*/mb_strlen($test);
$len = mb_strlen($test);
if ($len >= 2 && $test[0] == chr(0xff) && $test[1] == chr(0xd8)) {
return 'image/jpeg';
}
if ($len >= 3 && substr($test, 0, 3) == 'GIF') {
return 'image/gif';
}
if ($len >= 4 && /*overload*/mb_substr($test, 0, 4) == "\x89PNG") {
if ($len >= 4 && mb_substr($test, 0, 4) == "\x89PNG") {
return 'image/png';
}
return 'application/octet-stream';

View File

@ -159,11 +159,11 @@ $views = $GLOBALS['dbi']->getVirtualTables($db);
if (!empty($submit_mult) && !empty($what)) {
unset($message);
if (/*overload*/mb_strlen($table)) {
if (mb_strlen($table)) {
include './libraries/tbl_common.inc.php';
$url_query .= '&amp;goto=tbl_sql.php&amp;back=tbl_sql.php';
include './libraries/tbl_info.inc.php';
} elseif (/*overload*/mb_strlen($db)) {
} elseif (mb_strlen($db)) {
include './libraries/db_common.inc.php';
list(

View File

@ -32,9 +32,9 @@ function PMA_getUrlParams(
'query_type' => $what,
'reload' => (! empty($reload) ? 1 : 0),
);
if (/*overload*/mb_strpos(' ' . $action, 'db_') == 1) {
if (mb_strpos(' ' . $action, 'db_') == 1) {
$_url_params['db']= $db;
} elseif (/*overload*/mb_strpos(' ' . $action, 'tbl_') == 1
} elseif (mb_strpos(' ' . $action, 'tbl_') == 1
|| $what == 'row_delete'
) {
$_url_params['db']= $db;
@ -236,16 +236,16 @@ function PMA_buildOrExecuteQueryForMulti(
case 'replace_prefix_tbl':
$current = $selected[$i];
$subFromPrefix = /*overload*/mb_substr(
$subFromPrefix = mb_substr(
$current,
0,
/*overload*/mb_strlen($from_prefix)
mb_strlen($from_prefix)
);
if ($subFromPrefix == $from_prefix) {
$newtablename = $to_prefix
. /*overload*/mb_substr(
. mb_substr(
$current,
/*overload*/mb_strlen($from_prefix)
mb_strlen($from_prefix)
);
} else {
$newtablename = $current;
@ -261,7 +261,7 @@ function PMA_buildOrExecuteQueryForMulti(
case 'copy_tbl_change_prefix':
$current = $selected[$i];
$newtablename = $to_prefix .
/*overload*/mb_substr($current, /*overload*/mb_strlen($from_prefix));
mb_substr($current, mb_strlen($from_prefix));
// COPY TABLE AND CHANGE PREFIX PATTERN
$a_query = 'CREATE TABLE '
. PMA\libraries\Util::backquote($newtablename)

View File

@ -691,9 +691,9 @@ class NavigationTree
foreach ($node->children as $child) {
$prefix_pos = false;
foreach ($separators as $separator) {
$sep_pos = /*overload*/mb_strpos($child->name, $separator);
$sep_pos = mb_strpos($child->name, $separator);
if ($sep_pos != false
&& $sep_pos != /*overload*/mb_strlen($child->name)
&& $sep_pos != mb_strlen($child->name)
&& $sep_pos != 0
&& ($prefix_pos == false || $sep_pos < $prefix_pos)
) {
@ -701,9 +701,7 @@ class NavigationTree
}
}
if ($prefix_pos !== false) {
$prefix
= /*overload*/
mb_substr($child->name, 0, $prefix_pos);
$prefix = mb_substr($child->name, 0, $prefix_pos);
if (!isset($prefixes[$prefix])) {
$prefixes[$prefix] = 1;
} else {
@ -782,14 +780,12 @@ class NavigationTree
$separatorLength = strlen($separator);
// FIXME: this could be more efficient
foreach ($node->children as $child) {
$keySeparatorLength
= /*overload*/mb_strlen($key) + $separatorLength;
$name_substring
= /*overload*/mb_substr(
$child->name,
0,
$keySeparatorLength
);
$keySeparatorLength = mb_strlen($key) + $separatorLength;
$name_substring = mb_substr(
$child->name,
0,
$keySeparatorLength
);
if (($name_substring != $key . $separator
&& $child->name != $key)
|| $child->type != Node::OBJECT
@ -801,7 +797,6 @@ class NavigationTree
unset($class);
$new_child = NodeFactory::getInstance(
$className,
/*overload*/
mb_substr(
$child->name,
$keySeparatorLength

View File

@ -41,7 +41,7 @@ function PMA_getHtmlForColumnsList(
$type = $extracted_columnspec['type'];
}
if (empty($columnTypeList)
|| in_array(/*overload*/mb_strtoupper($type), $columnTypeList)
|| in_array(mb_strtoupper($type), $columnTypeList)
) {
if ($listType == 'checkbox') {
$selectColHtml .= '<input type="checkbox" value="'

View File

@ -361,7 +361,7 @@ function PMA_createDbBeforeCopy()
'SELECT @@lower_case_table_names'
);
if ($lowerCaseTableNames === '1') {
$_REQUEST['newname'] = /*overload*/mb_strtolower(
$_REQUEST['newname'] = mb_strtolower(
$_REQUEST['newname']
);
}
@ -1114,7 +1114,7 @@ function PMA_getTableOptionFieldset($comment, $tbl_collation,
);
} // end if (ARIA)
if (/*overload*/mb_strlen($auto_increment) > 0
if (mb_strlen($auto_increment) > 0
&& ($is_myisam_or_aria || $is_innodb || $is_pbxt)
) {
$html_output .= '<tr><td class="vmiddle">'
@ -1135,7 +1135,7 @@ function PMA_getTableOptionFieldset($comment, $tbl_collation,
if (isset($possible_row_formats[$tbl_storage_engine])) {
$current_row_format
= /*overload*/mb_strtoupper($GLOBALS['showtable']['Row_format']);
= mb_strtoupper($GLOBALS['showtable']['Row_format']);
$html_output .= '<tr><td class="vmiddle">'
. '<label for="new_row_format">ROW_FORMAT</label></td>'
. '<td>';
@ -1778,7 +1778,7 @@ function PMA_getTableAltersArray($is_myisam_or_aria, $is_isam, $pack_keys,
}
if (! empty($newTblStorageEngine)
&& /*overload*/mb_strtolower($newTblStorageEngine) !== /*overload*/mb_strtolower($GLOBALS['tbl_storage_engine'])
&& mb_strtolower($newTblStorageEngine) !== mb_strtolower($GLOBALS['tbl_storage_engine'])
) {
$table_alters[] = 'ENGINE = ' . $newTblStorageEngine;
}
@ -1838,10 +1838,10 @@ function PMA_getTableAltersArray($is_myisam_or_aria, $is_isam, $pack_keys,
if (! empty($_REQUEST['new_row_format'])) {
$newRowFormat = $_REQUEST['new_row_format'];
$newRowFormatLower = /*overload*/mb_strtolower($newRowFormat);
$newRowFormatLower = mb_strtolower($newRowFormat);
if (($is_myisam_or_aria || $is_innodb || $is_pbxt)
&& (!/*overload*/mb_strlen($row_format)
|| $newRowFormatLower !== /*overload*/mb_strtolower($row_format))
&& (!mb_strlen($row_format)
|| $newRowFormatLower !== mb_strtolower($row_format))
) {
$table_alters[] = 'ROW_FORMAT = '
. PMA\libraries\Util::sqlAddSlashes($newRowFormat);

View File

@ -29,10 +29,10 @@ function PMA_getPlugin(
$plugin_param = false
) {
$GLOBALS['plugin_param'] = $plugin_param;
$class_name = /*overload*/mb_strtoupper($plugin_type[0])
. /*overload*/mb_strtolower(/*overload*/mb_substr($plugin_type, 1))
. /*overload*/mb_strtoupper($plugin_format[0])
. /*overload*/mb_strtolower(/*overload*/mb_substr($plugin_format, 1));
$class_name = mb_strtoupper($plugin_type[0])
. mb_strtolower(mb_substr($plugin_type, 1))
. mb_strtoupper($plugin_format[0])
. mb_strtolower(mb_substr($plugin_format, 1));
$file = $class_name . ".php";
if (is_file($plugins_dir . $file)) {
//include_once $plugins_dir . $file;
@ -65,7 +65,7 @@ function PMA_getPlugins($plugin_type, $plugins_dir, $plugin_param)
$namespace = 'PMA\\' . str_replace('/', '\\', $plugins_dir);
$class_type = mb_strtoupper($plugin_type[0], 'UTF-8')
. mb_strtolower(/*overload*/mb_substr($plugin_type, 1), 'UTF-8');
. mb_strtolower(mb_substr($plugin_type, 1), 'UTF-8');
$prefix_class_name = $namespace . $class_type;
@ -202,10 +202,10 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = null)
$elem = explode('\\', get_class($plugin));
$plugin_name = array_pop($elem);
unset($elem);
$plugin_name = /*overload*/mb_strtolower(
/*overload*/mb_substr(
$plugin_name = mb_strtolower(
mb_substr(
$plugin_name,
/*overload*/mb_strlen($section)
mb_strlen($section)
)
);
$ret .= '<option';
@ -276,7 +276,7 @@ function PMA_pluginGetOneOption(
if (! $is_subgroup) {
// for subgroup headers
if (/*overload*/mb_strpos(get_class($propertyGroup), "PropertyItem")) {
if (mb_strpos(get_class($propertyGroup), "PropertyItem")) {
$properties = array($propertyGroup);
} else {
// for main groups
@ -306,7 +306,7 @@ function PMA_pluginGetOneOption(
foreach ($properties as $propertyItem) {
$property_class = get_class($propertyItem);
// if the property is a subgroup, we deal with it recursively
if (/*overload*/mb_strpos($property_class, "Subgroup")) {
if (mb_strpos($property_class, "Subgroup")) {
// for subgroups
// each subgroup can have a header, which may also be a form element
/** @var OptionsPropertyItem $subgroup_header */
@ -534,10 +534,10 @@ function PMA_pluginGetOptions($section, &$list)
$elem = explode('\\', get_class($plugin));
$plugin_name = array_pop($elem);
unset($elem);
$plugin_name = /*overload*/mb_strtolower(
/*overload*/mb_substr(
$plugin_name = mb_strtolower(
mb_substr(
$plugin_name,
/*overload*/mb_strlen($section)
mb_strlen($section)
)
);

View File

@ -63,7 +63,7 @@ abstract class ImportPlugin
*/
protected function getDbnameAndOptions($currentDb, $defaultDb)
{
if (/*overload*/mb_strlen($currentDb)) {
if (mb_strlen($currentDb)) {
$db_name = $currentDb;
$options = array('create_db' => false);
} else {

View File

@ -579,10 +579,10 @@ class AuthenticationCookie extends AuthenticationPlugin
// any parameters to pass?
$url_params = array();
if (/*overload*/mb_strlen($GLOBALS['db'])) {
if (mb_strlen($GLOBALS['db'])) {
$url_params['db'] = $GLOBALS['db'];
}
if (/*overload*/mb_strlen($GLOBALS['table'])) {
if (mb_strlen($GLOBALS['table'])) {
$url_params['table'] = $GLOBALS['table'];
}
// any target to pass?

View File

@ -129,7 +129,7 @@ class ExportCsv extends ExportPlugin
}
} else {
if (empty($csv_terminated)
|| /*overload*/mb_strtolower($csv_terminated) == 'auto'
|| mb_strtolower($csv_terminated) == 'auto'
) {
$csv_terminated = $GLOBALS['crlf'];
} else {
@ -248,7 +248,7 @@ class ExportCsv extends ExportPlugin
}
$schema_insert .= $csv_separator;
} // end for
$schema_insert = trim(/*overload*/mb_substr($schema_insert, 0, -1));
$schema_insert = trim(mb_substr($schema_insert, 0, -1));
if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
return false;
}

View File

@ -349,10 +349,7 @@ class ExportLatex extends ExportPlugin
. self::texEscape(stripslashes($columns_alias[$i])) . '}} & ';
}
$buffer
= /*overload*/
mb_substr($buffer, 0, -2)
. '\\\\ \\hline \hline ';
$buffer = mb_substr($buffer, 0, -2) . '\\\\ \\hline \hline ';
if (!PMA_exportOutputHandler($buffer . ' \\endfirsthead ' . $crlf)) {
return false;
}
@ -619,23 +616,19 @@ class ExportLatex extends ExportPlugin
}
$local_buffer = self::texEscape($local_buffer);
if ($row['Key'] == 'PRI') {
$pos
= /*overload*/
mb_strpos($local_buffer, "\000");
$pos = mb_strpos($local_buffer, "\000");
$local_buffer = '\\textit{'
. /*overload*/
.
mb_substr($local_buffer, 0, $pos)
. '}' . /*overload*/
. '}' .
mb_substr($local_buffer, $pos);
}
if (in_array($field_name, $unique_keys)) {
$pos
= /*overload*/
mb_strpos($local_buffer, "\000");
$pos = mb_strpos($local_buffer, "\000");
$local_buffer = '\\textbf{'
. /*overload*/
.
mb_substr($local_buffer, 0, $pos)
. '}' . /*overload*/
. '}' .
mb_substr($local_buffer, $pos);
}
$buffer = str_replace("\000", ' & ', $local_buffer);

View File

@ -806,12 +806,12 @@ class ExportSql extends ExportPlugin
isset($GLOBALS['sql_backquotes'])
);
$collation = PMA_getDbCollation($db);
if (/*overload*/mb_strpos($collation, '_')) {
if (mb_strpos($collation, '_')) {
$create_query .= ' DEFAULT CHARACTER SET '
. /*overload*/mb_substr(
. mb_substr(
$collation,
0,
/*overload*/mb_strpos($collation, '_')
mb_strpos($collation, '_')
)
. ' COLLATE ' . $collation;
} else {
@ -1485,11 +1485,11 @@ class ExportSql extends ExportPlugin
// Convert end of line chars to one that we want (note that MySQL
// doesn't return query it will accept in all cases)
if (/*overload*/mb_strpos($create_query, "(\r\n ")) {
if (mb_strpos($create_query, "(\r\n ")) {
$create_query = str_replace("\r\n", $crlf, $create_query);
} elseif (/*overload*/mb_strpos($create_query, "(\n ")) {
} elseif (mb_strpos($create_query, "(\n ")) {
$create_query = str_replace("\n", $crlf, $create_query);
} elseif (/*overload*/mb_strpos($create_query, "(\r ")) {
} elseif (mb_strpos($create_query, "(\r ")) {
$create_query = str_replace("\r", $crlf, $create_query);
}
@ -2433,9 +2433,7 @@ class ExportSql extends ExportPlugin
. implode(', ', $values) . ')';
} else {
$insert_line = '(' . implode(', ', $values) . ')';
$insertLineSize
= /*overload*/
mb_strlen($insert_line);
$insertLineSize = mb_strlen($insert_line);
$sql_max_size = $GLOBALS['sql_max_query_size'];
if (isset($sql_max_size)
&& $sql_max_size > 0
@ -2449,9 +2447,7 @@ class ExportSql extends ExportPlugin
$insert_line = $schema_insert . $insert_line;
}
}
$query_size
+= /*overload*/
mb_strlen($insert_line);
$query_size += mb_strlen($insert_line);
// Other inserts case
} else {
$insert_line = $schema_insert

View File

@ -17,7 +17,7 @@ use PMA\libraries\DatabaseInterface;
use PMA\libraries\plugins\ExportPlugin;
use PMA\libraries\Util;
if (!/*overload*/mb_strlen($GLOBALS['db'])) { /* Can't do server export */
if (!mb_strlen($GLOBALS['db'])) { /* Can't do server export */
$GLOBALS['skip_import'] = true;
return;
}
@ -258,9 +258,7 @@ class ExportXml extends ExportPlugin
. $trigger['name'] . '">' . $crlf;
// Do some formatting
$code
= /*overload*/
mb_substr(rtrim($code), 0, -3);
$code = mb_substr(rtrim($code), 0, -3);
$code = " " . htmlspecialchars($code);
$code = str_replace("\n", "\n ", $code);

View File

@ -80,9 +80,9 @@ class TableProperty
*/
public function getPureType()
{
$pos = /*overload*/mb_strpos($this->type, "(");
$pos = mb_strpos($this->type, "(");
if ($pos > 0) {
return /*overload*/mb_substr($this->type, 0, $pos);
return mb_substr($this->type, 0, $pos);
}
return $this->type;
}
@ -114,28 +114,28 @@ class TableProperty
*/
public function getDotNetPrimitiveType()
{
if (/*overload*/mb_strpos($this->type, "int") === 0) {
if (mb_strpos($this->type, "int") === 0) {
return "int";
}
if (/*overload*/mb_strpos($this->type, "longtext") === 0) {
if (mb_strpos($this->type, "longtext") === 0) {
return "string";
}
if (/*overload*/mb_strpos($this->type, "long") === 0) {
if (mb_strpos($this->type, "long") === 0) {
return "long";
}
if (/*overload*/mb_strpos($this->type, "char") === 0) {
if (mb_strpos($this->type, "char") === 0) {
return "string";
}
if (/*overload*/mb_strpos($this->type, "varchar") === 0) {
if (mb_strpos($this->type, "varchar") === 0) {
return "string";
}
if (/*overload*/mb_strpos($this->type, "text") === 0) {
if (mb_strpos($this->type, "text") === 0) {
return "string";
}
if (/*overload*/mb_strpos($this->type, "tinyint") === 0) {
if (mb_strpos($this->type, "tinyint") === 0) {
return "bool";
}
if (/*overload*/mb_strpos($this->type, "datetime") === 0) {
if (mb_strpos($this->type, "datetime") === 0) {
return "DateTime";
}
return "unknown";
@ -148,28 +148,28 @@ class TableProperty
*/
public function getDotNetObjectType()
{
if (/*overload*/mb_strpos($this->type, "int") === 0) {
if (mb_strpos($this->type, "int") === 0) {
return "Int32";
}
if (/*overload*/mb_strpos($this->type, "longtext") === 0) {
if (mb_strpos($this->type, "longtext") === 0) {
return "String";
}
if (/*overload*/mb_strpos($this->type, "long") === 0) {
if (mb_strpos($this->type, "long") === 0) {
return "Long";
}
if (/*overload*/mb_strpos($this->type, "char") === 0) {
if (mb_strpos($this->type, "char") === 0) {
return "String";
}
if (/*overload*/mb_strpos($this->type, "varchar") === 0) {
if (mb_strpos($this->type, "varchar") === 0) {
return "String";
}
if (/*overload*/mb_strpos($this->type, "text") === 0) {
if (mb_strpos($this->type, "text") === 0) {
return "String";
}
if (/*overload*/mb_strpos($this->type, "tinyint") === 0) {
if (mb_strpos($this->type, "tinyint") === 0) {
return "Boolean";
}
if (/*overload*/mb_strpos($this->type, "datetime") === 0) {
if (mb_strpos($this->type, "datetime") === 0) {
return "DateTime";
}
return "Unknown";
@ -182,7 +182,7 @@ class TableProperty
*/
public function getIndexName()
{
if (/*overload*/mb_strlen($this->key) > 0) {
if (mb_strlen($this->key) > 0) {
return "index=\""
. htmlspecialchars($this->name, ENT_COMPAT, 'UTF-8')
. "\"";

View File

@ -113,7 +113,7 @@ class ImportCsv extends AbstractImportCsv
$csv_new_line = strtr($csv_new_line, $replacements);
$param_error = false;
if (/*overload*/mb_strlen($csv_terminated) < 1) {
if (mb_strlen($csv_terminated) < 1) {
$message = PMA\libraries\Message::error(
__('Invalid parameter for CSV import: %s')
);
@ -128,7 +128,7 @@ class ImportCsv extends AbstractImportCsv
// confuses this script.
// But the parser won't work correctly with strings so we allow just
// one character.
} elseif (/*overload*/mb_strlen($csv_enclosed) > 1) {
} elseif (mb_strlen($csv_enclosed) > 1) {
$message = PMA\libraries\Message::error(
__('Invalid parameter for CSV import: %s')
);
@ -139,14 +139,14 @@ class ImportCsv extends AbstractImportCsv
// confuses this script.
// But the parser won't work correctly with strings so we allow just
// one character.
} elseif (/*overload*/mb_strlen($csv_escaped) > 1) {
} elseif (mb_strlen($csv_escaped) > 1) {
$message = PMA\libraries\Message::error(
__('Invalid parameter for CSV import: %s')
);
$message->addParam(__('Columns escaped with'), false);
$error = true;
$param_error = true;
} elseif (/*overload*/mb_strlen($csv_new_line) != 1
} elseif (mb_strlen($csv_new_line) != 1
&& $csv_new_line != 'auto'
) {
$message = PMA\libraries\Message::error(
@ -238,9 +238,7 @@ class ImportCsv extends AbstractImportCsv
$col_count = 0;
$max_cols = 0;
$csv_terminated_len
= /*overload*/
mb_strlen($csv_terminated);
$csv_terminated_len = mb_strlen($csv_terminated);
while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
$data = PMA_importGetNextChunk();
if ($data === false) {
@ -256,9 +254,7 @@ class ImportCsv extends AbstractImportCsv
// Force a trailing new line at EOF to prevent parsing problems
if ($finished && $buffer) {
$finalch
= /*overload*/
mb_substr($buffer, -1);
$finalch = mb_substr($buffer, -1);
if ($csv_new_line == 'auto'
&& $finalch != "\r"
&& $finalch != "\n"
@ -274,19 +270,17 @@ class ImportCsv extends AbstractImportCsv
// Do not parse string when we're not at the end
// and don't have new line inside
if (($csv_new_line == 'auto'
&& /*overload*/mb_strpos($buffer, "\r") === false
&& /*overload*/mb_strpos($buffer, "\n") === false)
&& mb_strpos($buffer, "\r") === false
&& mb_strpos($buffer, "\n") === false)
|| ($csv_new_line != 'auto'
&& /*overload*/mb_strpos($buffer, $csv_new_line) === false)
&& mb_strpos($buffer, $csv_new_line) === false)
) {
continue;
}
}
// Current length of our buffer
$len
= /*overload*/
mb_strlen($buffer);
$len = mb_strlen($buffer);
// Currently parsed char
$ch = mb_substr($buffer, $i, 1);
@ -583,17 +577,11 @@ class ImportCsv extends AbstractImportCsv
$line++;
$csv_finish = false;
$values = array();
$buffer
= /*overload*/
mb_substr($buffer, $i + 1);
$len
= /*overload*/
mb_strlen($buffer);
$buffer = mb_substr($buffer, $i + 1);
$len = mb_strlen($buffer);
$i = 0;
$lasti = -1;
$ch
= /*overload*/
mb_substr($buffer, 0, 1);
$ch = mb_substr($buffer, 0, 1);
}
} // End of parser loop
} // End of import loop
@ -625,7 +613,7 @@ class ImportCsv extends AbstractImportCsv
}
}
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$result = $GLOBALS['dbi']->fetchResult('SHOW TABLES');
$tbl_name = 'TABLE ' . (count($result) + 1);
} else {

View File

@ -94,9 +94,7 @@ class ImportMediawiki extends ImportPlugin
if ($data === false) {
// Subtract data we didn't handle yet and stop processing
$GLOBALS['offset']
-= /*overload*/
mb_strlen($buffer);
$GLOBALS['offset'] -= mb_strlen($buffer);
break;
} elseif ($data === true) {
// Handle rest of buffer
@ -106,7 +104,7 @@ class ImportMediawiki extends ImportPlugin
unset($data);
// Don't parse string if we're not at the end
// and don't have a new line inside
if (/*overload*/mb_strpos($buffer, $mediawiki_new_line) === false) {
if (mb_strpos($buffer, $mediawiki_new_line) === false) {
continue;
}
}
@ -139,12 +137,12 @@ class ImportMediawiki extends ImportPlugin
$matches = array();
// Check beginning of comment
if (!strcmp(/*overload*/mb_substr($cur_buffer_line, 0, 4), "<!--")) {
if (!strcmp(mb_substr($cur_buffer_line, 0, 4), "<!--")) {
$inside_comment = true;
continue;
} elseif ($inside_comment) {
// Check end of comment
if (!strcmp(/*overload*/mb_substr($cur_buffer_line, 0, 4), "-->")
if (!strcmp(mb_substr($cur_buffer_line, 0, 4), "-->")
) {
// Only data comments are closed. The structure comments
// will be closed when a data comment begins (in order to
@ -201,9 +199,9 @@ class ImportMediawiki extends ImportPlugin
$in_table_header = false;
// End processing because the current line does not
// contain any column information
} elseif (/*overload*/mb_substr($cur_buffer_line, 0, 2) === '|-'
|| /*overload*/mb_substr($cur_buffer_line, 0, 2) === '|+'
|| /*overload*/mb_substr($cur_buffer_line, 0, 2) === '|}'
} elseif (mb_substr($cur_buffer_line, 0, 2) === '|-'
|| mb_substr($cur_buffer_line, 0, 2) === '|+'
|| mb_substr($cur_buffer_line, 0, 2) === '|}'
) {
// Check begin row or end table
@ -225,7 +223,7 @@ class ImportMediawiki extends ImportPlugin
$cur_temp_line = array();
// No more processing required at the end of the table
if (/*overload*/mb_substr($cur_buffer_line, 0, 2) === '|}') {
if (mb_substr($cur_buffer_line, 0, 2) === '|}') {
$current_table = array(
$cur_table_name,
$cur_temp_table_headers,
@ -548,7 +546,7 @@ class ImportMediawiki extends ImportPlugin
// A '|' inside an invalid link should not
// be mistaken as delimiting cell parameters
if (/*overload*/mb_strpos($cell_data[0], '[[') === false) {
if (mb_strpos($cell_data[0], '[[') === false) {
return $cell;
}
@ -586,8 +584,8 @@ class ImportMediawiki extends ImportPlugin
*/
private function _getCellContent($cell, $col_start_char)
{
if (/*overload*/mb_strpos($cell, $col_start_char) === 0) {
$cell = trim(/*overload*/mb_substr($cell, 1));
if (mb_strpos($cell, $col_start_char) === 0) {
$cell = trim(mb_substr($cell, 1));
}
return $cell;

View File

@ -103,14 +103,11 @@ class ImportShp extends ImportPlugin
$temp_dbf_file = true;
// Replace the .dbf with .*, as required
// by the bsShapeFiles library.
$file_name
= /*overload*/
mb_substr(
$dbf_file_path,
0,
/*overload*/
mb_strlen($dbf_file_path) - 4
) . '.*';
$file_name = mb_substr(
$dbf_file_path,
0,
mb_strlen($dbf_file_path) - 4
) . '.*';
$shp->FileName = $file_name;
}
}
@ -122,14 +119,11 @@ class ImportShp extends ImportPlugin
// to load extra data.
// Replace the .shp with .*,
// so the bsShapeFiles library correctly locates .dbf file.
$file_name
= /*overload*/
mb_substr(
$import_file,
0,
/*overload*/
mb_strlen($import_file) - 4
) . '.*';
$file_name = mb_substr(
$import_file,
0,
mb_strlen($import_file) - 4
) . '.*';
$shp->FileName = $file_name;
}
}
@ -265,7 +259,7 @@ class ImportShp extends ImportPlugin
}
// Set table name based on the number of tables
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$result = $GLOBALS['dbi']->fetchResult('SHOW TABLES');
$table_name = 'TABLE ' . (count($result) + 1);
} else {
@ -283,7 +277,7 @@ class ImportShp extends ImportPlugin
$analyses[$table_no][FORMATTEDSQL][$spatial_col] = true;
// Set database name to the currently selected one, if applicable
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$db_name = $db;
$options = array('create_db' => false);
} else {

View File

@ -181,9 +181,8 @@ class Dia extends XMLWriter
PMA_downloadHeader(
$fileName,
'application/x-dia-diagram',
/*overload*/
mb_strlen($output)
);
print $output;
}
}
}

View File

@ -270,9 +270,8 @@ class Eps
PMA_downloadHeader(
$fileName,
'image/x-eps',
/*overload*/
mb_strlen($output)
);
print $output;
}
}
}

View File

@ -338,7 +338,7 @@ class Pdf extends PDF_lib
}
$wmax = ($w-2 * $this->cMargin) * 1000 / $this->FontSize;
$s = str_replace("\r", '', $txt);
$nb = /*overload*/mb_strlen($s);
$nb = mb_strlen($s);
if ($nb > 0 and $s[$nb-1] == "\n") {
$nb--;
}
@ -360,7 +360,7 @@ class Pdf extends PDF_lib
if ($c == ' ') {
$sep = $i;
}
$l += isset($cw[/*overload*/mb_ord($c)])?$cw[/*overload*/mb_ord($c)]:0 ;
$l += isset($cw[mb_ord($c)])?$cw[mb_ord($c)]:0 ;
if ($l > $wmax) {
if ($sep == -1) {
if ($i == $j) {
@ -393,4 +393,4 @@ class Pdf extends PDF_lib
{
$this->_offline = $value;
}
}
}

View File

@ -193,7 +193,6 @@ class Svg extends XMLWriter
PMA_downloadHeader(
$fileName,
'image/svg+xml',
/*overload*/
mb_strlen($output)
);
print $output;

View File

@ -59,9 +59,7 @@ abstract class DateFormatTransformationsPlugin extends TransformationsPlugin
if (empty($options[2])) {
$options[2] = 'local';
} else {
$options[2]
= /*overload*/
mb_strtolower($options[2]);
$options[2] = mb_strtolower($options[2]);
}
if (empty($options[1])) {
@ -87,26 +85,24 @@ abstract class DateFormatTransformationsPlugin extends TransformationsPlugin
} else {
if (preg_match('/^(\d{2}){3,7}$/', $buffer)) {
if (/*overload*/mb_strlen($buffer) == 14
|| /*overload*/mb_strlen($buffer) == 8
) {
if (mb_strlen($buffer) == 14 || mb_strlen($buffer) == 8) {
$offset = 4;
} else {
$offset = 2;
}
$aDate = array();
$aDate['year'] = (int)/*overload*/
$aDate['year'] = (int)
mb_substr($buffer, 0, $offset);
$aDate['month'] = (int)/*overload*/
$aDate['month'] = (int)
mb_substr($buffer, $offset, 2);
$aDate['day'] = (int)/*overload*/
$aDate['day'] = (int)
mb_substr($buffer, $offset + 2, 2);
$aDate['hour'] = (int)/*overload*/
$aDate['hour'] = (int)
mb_substr($buffer, $offset + 4, 2);
$aDate['minute'] = (int)/*overload*/
$aDate['minute'] = (int)
mb_substr($buffer, $offset + 6, 2);
$aDate['second'] = (int)/*overload*/
$aDate['second'] = (int)
mb_substr($buffer, $offset + 8, 2);
if (checkdate($aDate['month'], $aDate['day'], $aDate['year'])) {

View File

@ -50,25 +50,17 @@ abstract class SubstringTransformationsPlugin extends TransformationsPlugin
$options = $this->getOptions($options, array(0, 'all', '…'));
if ($options[1] != 'all') {
$newtext
= /*overload*/
mb_substr(
$buffer,
$options[0],
$options[1]
);
$newtext = mb_substr(
$buffer,
$options[0],
$options[1]
);
} else {
$newtext
= /*overload*/
mb_substr($buffer, $options[0]);
$newtext = mb_substr($buffer, $options[0]);
}
$length
= /*overload*/
mb_strlen($newtext);
$baselength
= /*overload*/
mb_strlen($buffer);
$length = mb_strlen($newtext);
$baselength = mb_strlen($buffer);
if ($length != $baselength) {
if ($options[0] != 0) {
$newtext = $options[2] . $newtext;

View File

@ -57,7 +57,7 @@ function PMA_getTablesInfo()
$one_table['TABLE_NAME'], ENT_QUOTES
);
$GLOBALS['PMD']['TABLE_TYPE'][$i] = /*overload*/mb_strtoupper(
$GLOBALS['PMD']['TABLE_TYPE'][$i] = mb_strtoupper(
$one_table['ENGINE']
);
@ -533,9 +533,9 @@ function PMA_saveDisplayField($db, $table, $field)
function PMA_addNewRelation($db, $T1, $F1, $T2, $F2, $on_delete, $on_update)
{
$tables = $GLOBALS['dbi']->getTablesFull($db, $T1);
$type_T1 = /*overload*/mb_strtoupper($tables[$T1]['ENGINE']);
$type_T1 = mb_strtoupper($tables[$T1]['ENGINE']);
$tables = $GLOBALS['dbi']->getTablesFull($db, $T2);
$type_T2 = /*overload*/mb_strtoupper($tables[$T2]['ENGINE']);
$type_T2 = mb_strtoupper($tables[$T2]['ENGINE']);
// native foreign key
if (PMA\libraries\Util::isForeignKeySupported($type_T1)
@ -659,9 +659,9 @@ function PMA_removeRelation($T1, $F1, $T2, $F2)
list($DB2, $T2) = explode(".", $T2);
$tables = $GLOBALS['dbi']->getTablesFull($DB1, $T1);
$type_T1 = /*overload*/mb_strtoupper($tables[$T1]['ENGINE']);
$type_T1 = mb_strtoupper($tables[$T1]['ENGINE']);
$tables = $GLOBALS['dbi']->getTablesFull($DB2, $T2);
$type_T2 = /*overload*/mb_strtoupper($tables[$T2]['ENGINE']);
$type_T2 = mb_strtoupper($tables[$T2]['ENGINE']);
if (PMA\libraries\Util::isForeignKeySupported($type_T1)
&& PMA\libraries\Util::isForeignKeySupported($type_T2)

View File

@ -753,7 +753,7 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both')
WHERE `master_db` = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'
AND `master_table` = \'' . PMA\libraries\Util::sqlAddSlashes($table)
. '\' ';
if (/*overload*/mb_strlen($column)) {
if (mb_strlen($column)) {
$rel_query .= ' AND `master_field` = '
. '\'' . PMA\libraries\Util::sqlAddSlashes($column) . '\'';
}
@ -762,7 +762,7 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both')
);
}
if (($source == 'both' || $source == 'foreign') && /*overload*/mb_strlen($table)
if (($source == 'both' || $source == 'foreign') && mb_strlen($table)
) {
$tableObj = new Table($table, $db);
$show_create_table = $tableObj->showCreate();
@ -781,8 +781,8 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both')
/**
* Emulating relations for some information_schema tables
*/
$isInformationSchema = /*overload*/mb_strtolower($db) == 'information_schema';
$isMysql = /*overload*/mb_strtolower($db) == 'mysql';
$isInformationSchema = mb_strtolower($db) == 'information_schema';
$isMysql = mb_strtolower($db) == 'mysql';
if (($isInformationSchema || $isMysql)
&& ($source == 'internal' || $source == 'both')
) {
@ -795,9 +795,9 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both')
}
if (isset($GLOBALS[$relations_key][$table])) {
foreach ($GLOBALS[$relations_key][$table] as $field => $relations) {
if ((! /*overload*/mb_strlen($column) || $column == $field)
if ((! mb_strlen($column) || $column == $field)
&& (! isset($foreign[$field])
|| ! /*overload*/mb_strlen($foreign[$field]))
|| ! mb_strlen($foreign[$field]))
) {
$foreign[$field] = $relations;
}
@ -983,7 +983,7 @@ function PMA_setDbComment($db, $comment = '')
return false;
}
if (/*overload*/mb_strlen($comment)) {
if (mb_strlen($comment)) {
$upd_query = 'INSERT INTO '
. PMA\libraries\Util::backquote($cfgRelation['db']) . '.'
. PMA\libraries\Util::backquote($cfgRelation['column_info'])
@ -1029,7 +1029,7 @@ function PMA_setHistory($db, $table, $username, $sqlquery)
$maxCharactersInDisplayedSQL = $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'];
// Prevent to run this automatically on Footer class destroying in testsuite
if (defined('TESTSUITE')
|| /*overload*/mb_strlen($sqlquery) > $maxCharactersInDisplayedSQL
|| mb_strlen($sqlquery) > $maxCharactersInDisplayedSQL
) {
return;
}
@ -1198,14 +1198,14 @@ function PMA_buildForeignDropdown($foreign, $data, $mode)
}
foreach ($foreign as $key => $value) {
if (/*overload*/mb_strlen($value) <= $GLOBALS['cfg']['LimitChars']
if (mb_strlen($value) <= $GLOBALS['cfg']['LimitChars']
) {
$vtitle = '';
$value = htmlspecialchars($value);
} else {
$vtitle = htmlspecialchars($value);
$value = htmlspecialchars(
/*overload*/mb_substr(
mb_substr(
$value, 0, $GLOBALS['cfg']['LimitChars']
) . '...'
);

View File

@ -226,8 +226,8 @@ function PMA_extractDbOrTable($string, $what = 'db')
*/
function PMA_Replication_Slave_control($action, $control = null, $link = null)
{
$action = /*overload*/mb_strtoupper($action);
$control = /*overload*/mb_strtoupper($control);
$action = mb_strtoupper($action);
$control = mb_strtoupper($control);
if ($action != "START" && $action != "STOP") {
return -1;

View File

@ -686,7 +686,7 @@ function PMA_getHtmlForReplicationMasterAddSlaveuser()
= PMA_replicationGetUsernameHostnameLength();
if (isset($_REQUEST['username'])
&& /*overload*/mb_strlen($_REQUEST['username']) === 0
&& mb_strlen($_REQUEST['username']) === 0
) {
$GLOBALS['pred_username'] = 'any';
}
@ -711,9 +711,9 @@ function PMA_getHtmlForReplicationMasterAddSlaveuser()
$thishost = str_replace(
"'",
'',
/*overload*/mb_substr(
mb_substr(
$_current_user,
(/*overload*/mb_strrpos($_current_user, '@') + 1)
(mb_strrpos($_current_user, '@') + 1)
)
);
if ($thishost == 'localhost' || $thishost == '127.0.0.1') {
@ -735,7 +735,7 @@ function PMA_getHtmlForReplicationMasterAddSlaveuser()
// when we start editing a user, $GLOBALS['pred_hostname'] is not defined
if (! isset($GLOBALS['pred_hostname']) && isset($_REQUEST['hostname'])) {
switch (/*overload*/mb_strtolower($_REQUEST['hostname'])) {
switch (mb_strtolower($_REQUEST['hostname'])) {
case 'localhost':
case '127.0.0.1':
$GLOBALS['pred_hostname'] = 'localhost';

View File

@ -187,7 +187,7 @@ function PMA_EVN_handleEditor()
$response->addJSON(
'name',
htmlspecialchars(
/*overload*/mb_strtoupper($_REQUEST['item_name'])
mb_strtoupper($_REQUEST['item_name'])
)
);
$response->addJSON('new_row', PMA_EVN_getRowForList($event));
@ -336,7 +336,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
{
global $db, $table, $event_status, $event_type, $event_interval;
$modeToUpper = /*overload*/mb_strtoupper($mode);
$modeToUpper = mb_strtoupper($mode);
// Escape special characters
$need_escape = array(
@ -529,7 +529,7 @@ function PMA_EVN_getQueryFromRequest()
$query = 'CREATE ';
if (! empty($_REQUEST['item_definer'])) {
if (/*overload*/mb_strpos($_REQUEST['item_definer'], '@') !== false
if (mb_strpos($_REQUEST['item_definer'], '@') !== false
) {
$arr = explode('@', $_REQUEST['item_definer']);
$query .= 'DEFINER=' . PMA\libraries\Util::backquote($arr[0]);

View File

@ -22,7 +22,7 @@ function PMA_RTE_getFooterLinks($docu, $priv, $name)
{
global $db, $table, $url_query, $ajax_class;
$icon = /*overload*/mb_strtolower($name) . '_add.png';
$icon = mb_strtolower($name) . '_add.png';
$retval = "";
$retval .= "<!-- ADD " . $name . " FORM START -->\n";
$retval .= "<fieldset class='left'>\n";
@ -30,7 +30,7 @@ function PMA_RTE_getFooterLinks($docu, $priv, $name)
$retval .= " <div class='wrap'>\n";
if (PMA\libraries\Util::currentUserHasPrivilege($priv, $db, $table)) {
$retval .= " <a {$ajax_class['add']} ";
$retval .= "href='db_" . /*overload*/mb_strtolower($name) . "s.php";
$retval .= "href='db_" . mb_strtolower($name) . "s.php";
$retval .= "$url_query&amp;add_item=1' ";
$retval .= "onclick='$.datepicker.initialized = false;'>";
$icon = 'b_' . $icon;
@ -88,7 +88,7 @@ function PMA_EVN_getFooterLinks()
0,
1
);
$es_state = /*overload*/mb_strtolower($es_state);
$es_state = mb_strtolower($es_state);
$options = array(
0 => array(
'label' => __('OFF'),

View File

@ -47,7 +47,7 @@ if ($GLOBALS['is_ajax_request'] != true) {
* to manually select the required database and
* create the missing $url_query variable
*/
if (/*overload*/mb_strlen($db)) {
if (mb_strlen($db)) {
$GLOBALS['dbi']->selectDb($db);
if (! isset($url_query)) {
$url_query = PMA_URL_getCommon(

View File

@ -300,7 +300,6 @@ function PMA_RTN_handleRequestCreateOrEdit($errors, $db)
$response->addJSON(
'name',
htmlspecialchars(
/*overload*/
mb_strtoupper($_REQUEST['item_name'])
)
);
@ -540,7 +539,7 @@ function PMA_RTN_getDataFromRequest()
$retval['item_isdeterministic'] = '';
if (isset($_REQUEST['item_isdeterministic'])
&& /*overload*/mb_strtolower($_REQUEST['item_isdeterministic']) == 'on'
&& mb_strtolower($_REQUEST['item_isdeterministic']) == 'on'
) {
$retval['item_isdeterministic'] = " checked='checked'";
}
@ -877,7 +876,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
// Create the output
$retval = "";
$retval .= "<!-- START " . /*overload*/mb_strtoupper($mode)
$retval .= "<!-- START " . mb_strtoupper($mode)
. " ROUTINE FORM -->\n\n";
$retval .= "<form class='rte_form' action='db_routines.php' method='post'>\n";
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
@ -1066,7 +1065,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
$retval .= "</fieldset>";
}
$retval .= "</form>";
$retval .= "<!-- END " . /*overload*/mb_strtoupper($mode) . " ROUTINE FORM -->";
$retval .= "<!-- END " . mb_strtoupper($mode) . " ROUTINE FORM -->";
return $retval;
} // end PMA_RTN_getEditorForm()
@ -1085,7 +1084,7 @@ function PMA_RTN_getQueryFromRequest()
$query = 'CREATE ';
if (! empty($_REQUEST['item_definer'])) {
if (/*overload*/mb_strpos($_REQUEST['item_definer'], '@') !== false) {
if (mb_strpos($_REQUEST['item_definer'], '@') !== false) {
$arr = explode('@', $_REQUEST['item_definer']);
$query .= 'DEFINER=' . PMA\libraries\Util::backquote($arr[0]);
$query .= '@' . PMA\libraries\Util::backquote($arr[1]) . ' ';
@ -1170,7 +1169,7 @@ function PMA_RTN_getQueryFromRequest()
if (! empty($_REQUEST['item_param_opts_text'][$i])) {
if ($PMA_Types->getTypeClass($item_param_type[$i]) == 'CHAR') {
$params .= ' CHARSET '
. /*overload*/mb_strtolower(
. mb_strtolower(
$_REQUEST['item_param_opts_text'][$i]
);
}
@ -1178,7 +1177,7 @@ function PMA_RTN_getQueryFromRequest()
if (! empty($_REQUEST['item_param_opts_num'][$i])) {
if ($PMA_Types->getTypeClass($item_param_type[$i]) == 'NUMBER') {
$params .= ' '
. /*overload*/mb_strtoupper(
. mb_strtoupper(
$_REQUEST['item_param_opts_num'][$i]
);
}
@ -1232,13 +1231,13 @@ function PMA_RTN_getQueryFromRequest()
if (! empty($_REQUEST['item_returnopts_text'])) {
if ($PMA_Types->getTypeClass($item_returntype) == 'CHAR') {
$query .= ' CHARSET '
. /*overload*/mb_strtolower($_REQUEST['item_returnopts_text']);
. mb_strtolower($_REQUEST['item_returnopts_text']);
}
}
if (! empty($_REQUEST['item_returnopts_num'])) {
if ($PMA_Types->getTypeClass($item_returntype) == 'NUMBER') {
$query .= ' '
. /*overload*/mb_strtoupper($_REQUEST['item_returnopts_num']);
. mb_strtoupper($_REQUEST['item_returnopts_num']);
}
}
$query .= ' ';
@ -1609,14 +1608,14 @@ function PMA_RTN_getExecuteForm($routine)
if (stristr($routine['item_param_type'][$i], 'enum')
|| stristr($routine['item_param_type'][$i], 'set')
|| in_array(
/*overload*/mb_strtolower($routine['item_param_type'][$i]),
mb_strtolower($routine['item_param_type'][$i]),
$no_support_types
)
) {
$retval .= "--\n";
} else {
$field = array(
'True_Type' => /*overload*/mb_strtolower(
'True_Type' => mb_strtolower(
$routine['item_param_type'][$i]
),
'Type' => '',
@ -1658,7 +1657,7 @@ function PMA_RTN_getExecuteForm($routine)
. $value . "<br />\n";
}
} else if (in_array(
/*overload*/mb_strtolower($routine['item_param_type'][$i]),
mb_strtolower($routine['item_param_type'][$i]),
$no_support_types
)) {
$retval .= "\n";

View File

@ -174,7 +174,7 @@ function PMA_TRI_handleEditor()
$response->addJSON(
'name',
htmlspecialchars(
/*overload*/mb_strtoupper(
mb_strtoupper(
$_REQUEST['item_name']
)
)
@ -292,7 +292,7 @@ function PMA_TRI_getEditorForm($mode, $item)
{
global $db, $table, $event_manipulations, $action_timings;
$modeToUpper = /*overload*/mb_strtoupper($mode);
$modeToUpper = mb_strtoupper($mode);
// Escape special characters
$need_escape = array(
@ -415,7 +415,7 @@ function PMA_TRI_getQueryFromRequest()
$query = 'CREATE ';
if (! empty($_REQUEST['item_definer'])) {
if (/*overload*/mb_strpos($_REQUEST['item_definer'], '@') !== false
if (mb_strpos($_REQUEST['item_definer'], '@') !== false
) {
$arr = explode('@', $_REQUEST['item_definer']);
$query .= 'DEFINER=' . PMA\libraries\Util::backquote($arr[0]);

Some files were not shown because too many files have changed in this diff Show More