Fix PHPCS issues.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
parent
e17de11c74
commit
80ced5fe8f
@ -672,8 +672,8 @@ if (isset($message)) {
|
||||
// in case of a query typed in the query window
|
||||
// (but if the query is too large, in case of an imported file, the parser
|
||||
// can choke on it so avoid parsing)
|
||||
if (/*overload*/mb_strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']
|
||||
) {
|
||||
$sqlLength = /*overload*/mb_strlen($sql_query);
|
||||
if ($sqlLength <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
|
||||
include_once 'libraries/parse_analyze.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -1416,7 +1416,9 @@ class PMA_Config
|
||||
= ($is_https ? 'https' : 'http')
|
||||
. ':'
|
||||
. (
|
||||
/*overload*/mb_substr($pma_absolute_uri, 0, 2) == '//' ? '' : '//'
|
||||
/*overload*/mb_substr($pma_absolute_uri, 0, 2) == '//'
|
||||
? ''
|
||||
: '//'
|
||||
)
|
||||
. $pma_absolute_uri;
|
||||
}
|
||||
@ -1604,8 +1606,9 @@ class PMA_Config
|
||||
) {
|
||||
$url['scheme'] = 'https';
|
||||
} elseif (PMA_getenv('HTTP_X_FORWARDED_PROTO')) {
|
||||
$url['scheme']
|
||||
= /*overload*/mb_strtolower(PMA_getenv('HTTP_X_FORWARDED_PROTO'));
|
||||
$url['scheme'] = /*overload*/mb_strtolower(
|
||||
PMA_getenv('HTTP_X_FORWARDED_PROTO')
|
||||
);
|
||||
} elseif (PMA_getenv('HTTP_FRONT_END_HTTPS')
|
||||
&& strtolower(PMA_getenv('HTTP_FRONT_END_HTTPS')) == 'on'
|
||||
) {
|
||||
@ -1846,7 +1849,8 @@ class PMA_Config
|
||||
function setCookie($cookie, $value, $default = null, $validity = null,
|
||||
$httponly = true
|
||||
) {
|
||||
if (/*overload*/mb_strlen($value) && null !== $default && $value === $default) {
|
||||
if (/*overload*/mb_strlen($value) && null !== $default && $value === $default
|
||||
) {
|
||||
// default value is used
|
||||
if (isset($_COOKIE[$cookie])) {
|
||||
// remove cookie
|
||||
|
||||
@ -1010,7 +1010,8 @@ class PMA_DbQbe
|
||||
&& isset($this->_curAndOrCol)
|
||||
) {
|
||||
$where_clause .= ' '
|
||||
. /*overload*/mb_strtoupper($this->_curAndOrCol[$last_where]) . ' ';
|
||||
. /*overload*/mb_strtoupper($this->_curAndOrCol[$last_where])
|
||||
. ' ';
|
||||
}
|
||||
if (! empty($this->_curField[$column_index])
|
||||
&& ! empty($this->_curCriteria[$column_index])
|
||||
@ -1046,7 +1047,9 @@ class PMA_DbQbe
|
||||
&& $column_index
|
||||
) {
|
||||
$qry_orwhere .= ' '
|
||||
. /*overload*/mb_strtoupper($this->_curAndOrCol[$last_orwhere])
|
||||
. /*overload*/mb_strtoupper(
|
||||
$this->_curAndOrCol[$last_orwhere]
|
||||
)
|
||||
. ' ';
|
||||
}
|
||||
if (! empty($this->_curField[$column_index])
|
||||
|
||||
@ -837,7 +837,9 @@ class PMA_DatabaseInterface
|
||||
$tables[$table_name]['TABLE_COMMENT']
|
||||
=& $tables[$table_name]['Comment'];
|
||||
|
||||
$commentUpper = /*overload*/mb_strtoupper($tables[$table_name]['Comment']);
|
||||
$commentUpper = /*overload*/mb_strtoupper(
|
||||
$tables[$table_name]['Comment']
|
||||
);
|
||||
if ($commentUpper === 'VIEW'
|
||||
&& $tables[$table_name]['Engine'] == null
|
||||
) {
|
||||
|
||||
@ -2133,7 +2133,7 @@ class PMA_DisplayResults
|
||||
private function _getSortingUrlParams(
|
||||
$sort_direction, $sort_order, $column_index, $index
|
||||
) {
|
||||
if (strtoupper(trim($sort_direction[$index])) == self::DESCENDING_SORT_DIR) {
|
||||
if (strtoupper(trim($sort_direction[$index])) == self::DESCENDING_SORT_DIR) {
|
||||
$sort_order .= ' ASC';
|
||||
$order_img = ' ' . PMA_Util::getImage(
|
||||
's_desc.png', __('Descending'),
|
||||
@ -3971,7 +3971,8 @@ class PMA_DisplayResults
|
||||
|| ($meta->type == self::DATETIME_FIELD)
|
||||
|| ($meta->type == self::TIME_FIELD)
|
||||
|| ($meta->type == self::TIME_FIELD))
|
||||
&& (/*overload*/mb_strpos($column, ".") !== false) // micro seconds delimeter
|
||||
// micro seconds delimiter
|
||||
&& (/*overload*/mb_strpos($column, ".") !== false)
|
||||
) {
|
||||
$column = PMA_Util::addMicroseconds($column);
|
||||
}
|
||||
@ -5480,7 +5481,10 @@ class PMA_DisplayResults
|
||||
|
||||
// if we want to use a text transformation on a BLOB column
|
||||
if (gettype($transformation_plugin) === "object") {
|
||||
$posMimeOctetstream = strpos($transformation_plugin->getMIMESubtype(), 'Octetstream');
|
||||
$posMimeOctetstream = strpos(
|
||||
$transformation_plugin->getMIMESubtype(),
|
||||
'Octetstream'
|
||||
);
|
||||
$posMimeText = strpos($transformation_plugin->getMIMEtype(), 'Text');
|
||||
if ($posMimeOctetstream
|
||||
|| $posMimeText !== false
|
||||
|
||||
@ -316,7 +316,10 @@ class PMA_ServerStatusData
|
||||
|
||||
// Set all class properties
|
||||
$this->db_isLocal = false;
|
||||
if (/*overload*/mb_strtolower($GLOBALS['cfg']['Server']['host']) === 'localhost'
|
||||
$serverHostToLower = /*overload*/mb_strtolower(
|
||||
$GLOBALS['cfg']['Server']['host']
|
||||
);
|
||||
if ($serverHostToLower === 'localhost'
|
||||
|| $GLOBALS['cfg']['Server']['host'] === '127.0.0.1'
|
||||
|| $GLOBALS['cfg']['Server']['host'] === '::1'
|
||||
) {
|
||||
|
||||
@ -856,7 +856,8 @@ class PMA_Table
|
||||
);
|
||||
// ANSI_QUOTES might be a subset of sql_mode, for example
|
||||
// REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
|
||||
if (false !== /*overload*/mb_strpos($server_sql_mode, 'ANSI_QUOTES')) {
|
||||
if (false !== /*overload*/mb_strpos($server_sql_mode, 'ANSI_QUOTES')
|
||||
) {
|
||||
$table_delimiter = 'quote_double';
|
||||
} else {
|
||||
$table_delimiter = 'quote_backtick';
|
||||
@ -1625,12 +1626,11 @@ class PMA_Table
|
||||
foreach ($avail_columns as $each_col) {
|
||||
// check if $each_col ends with $colname
|
||||
if (substr_compare(
|
||||
$each_col,
|
||||
$colname,
|
||||
/*overload*/
|
||||
mb_strlen($each_col) - /*overload*/
|
||||
mb_strlen($colname)
|
||||
) === 0
|
||||
$each_col,
|
||||
$colname,
|
||||
/*overload*/mb_strlen($each_col)
|
||||
- /*overload*/mb_strlen($colname)
|
||||
) === 0
|
||||
) {
|
||||
return $this->uiprefs[$property];
|
||||
}
|
||||
|
||||
@ -385,8 +385,8 @@ class PMA_Util
|
||||
/**
|
||||
* format sql strings
|
||||
*
|
||||
* @param string $sql_query raw SQL string
|
||||
* @param boolean $truncate truncate the query if it is too long
|
||||
* @param string $sqlQuery raw SQL string
|
||||
* @param boolean $truncate truncate the query if it is too long
|
||||
*
|
||||
* @return string the formatted sql
|
||||
*
|
||||
@ -395,21 +395,21 @@ class PMA_Util
|
||||
* @access public
|
||||
* @todo move into PMA_Sql
|
||||
*/
|
||||
public static function formatSql($sql_query, $truncate = false)
|
||||
public static function formatSql($sqlQuery, $truncate = false)
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
if ($truncate
|
||||
&& /*overload*/mb_strlen($sql_query) > $cfg['MaxCharactersInDisplayedSQL']
|
||||
&& /*overload*/mb_strlen($sqlQuery) > $cfg['MaxCharactersInDisplayedSQL']
|
||||
) {
|
||||
$sql_query = /*overload*/mb_substr(
|
||||
$sql_query,
|
||||
$sqlQuery = /*overload*/mb_substr(
|
||||
$sqlQuery,
|
||||
0,
|
||||
$cfg['MaxCharactersInDisplayedSQL']
|
||||
) . '[...]';
|
||||
}
|
||||
return '<code class="sql"><pre>' . "\n"
|
||||
. htmlspecialchars($sql_query) . "\n"
|
||||
. htmlspecialchars($sqlQuery) . "\n"
|
||||
. '</pre></code>';
|
||||
} // end of the "formatSql()" function
|
||||
|
||||
@ -637,8 +637,8 @@ class PMA_Util
|
||||
// ---
|
||||
// modified to show the help on sql errors
|
||||
$error_msg .= '<p><strong>' . __('SQL query:') . '</strong>' . "\n";
|
||||
if (/*overload*/mb_strstr(/*overload*/mb_strtolower($formatted_sql), 'select')
|
||||
) {
|
||||
$formattedSqlToLower = /*overload*/mb_strtolower($formatted_sql);
|
||||
if (/*overload*/mb_strstr($formattedSqlToLower, 'select')) {
|
||||
// please show me help to the error on select
|
||||
$error_msg .= self::showMySQLDocu('SELECT');
|
||||
}
|
||||
@ -1059,8 +1059,8 @@ class PMA_Util
|
||||
|
||||
$query_too_big = false;
|
||||
|
||||
if (/*overload*/mb_strlen($query_base) > $cfg['MaxCharactersInDisplayedSQL']
|
||||
) {
|
||||
$queryLength = /*overload*/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;
|
||||
@ -1165,7 +1165,8 @@ class PMA_Util
|
||||
} elseif (preg_match(
|
||||
'@^EXPLAIN[[:space:]]+SELECT[[:space:]]+@i', $sql_query
|
||||
)) {
|
||||
$explain_params['sql_query'] = /*overload*/mb_substr($sql_query, 8);
|
||||
$explain_params['sql_query']
|
||||
= /*overload*/mb_substr($sql_query, 8);
|
||||
$_message = __('Skip Explain SQL');
|
||||
}
|
||||
if (isset($explain_params['sql_query']) && isset($_message)) {
|
||||
@ -1822,8 +1823,9 @@ class PMA_Util
|
||||
if ($suhosin_get_MaxValueLength) {
|
||||
$query_parts = self::splitURLQuery($url);
|
||||
foreach ($query_parts as $query_pair) {
|
||||
list($eachvar, $eachval) = explode('=', $query_pair);
|
||||
if (/*overload*/mb_strlen($eachval) > $suhosin_get_MaxValueLength) {
|
||||
list(, $eachval) = explode('=', $query_pair);
|
||||
if (/*overload*/mb_strlen($eachval) > $suhosin_get_MaxValueLength
|
||||
) {
|
||||
$in_suhosin_limits = false;
|
||||
break;
|
||||
}
|
||||
@ -2951,7 +2953,7 @@ class PMA_Util
|
||||
/*overload*/mb_substr(
|
||||
$columnspec,
|
||||
$first_bracket_pos + 1,
|
||||
(/*overload*/mb_strrpos($columnspec, ')') - $first_bracket_pos - 1)
|
||||
/*overload*/mb_strrpos($columnspec, ')') - $first_bracket_pos - 1
|
||||
)
|
||||
);
|
||||
// convert to lowercase just to be sure
|
||||
@ -4354,7 +4356,11 @@ class PMA_Util
|
||||
}
|
||||
|
||||
$value .= '000000';
|
||||
return /*overload*/mb_substr($value, 0, /*overload*/mb_strpos($value, '.') + 7);
|
||||
return /*overload*/mb_substr(
|
||||
$value,
|
||||
0,
|
||||
/*overload*/mb_strpos($value, '.') + 7
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -745,11 +745,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
&& ! is_numeric($_REQUEST['server'])
|
||||
) {
|
||||
foreach ($cfg['Servers'] as $i => $server) {
|
||||
$verboseLower = /*overload*/mb_strtolower($server['verbose']);
|
||||
$verboseToLower = /*overload*/mb_strtolower($server['verbose']);
|
||||
$serverToLower = /*overload*/mb_strtolower($_REQUEST['server']);
|
||||
if ($server['host'] == $_REQUEST['server']
|
||||
|| $server['verbose'] == $_REQUEST['server']
|
||||
|| $verboseLower == /*overload*/mb_strtolower($_REQUEST['server'])
|
||||
|| md5($verboseLower) == /*overload*/mb_strtolower($_REQUEST['server'])
|
||||
|| $verboseToLower == $serverToLower
|
||||
|| md5($verboseToLower) == $serverToLower
|
||||
) {
|
||||
$_REQUEST['server'] = $i;
|
||||
break;
|
||||
|
||||
@ -76,7 +76,10 @@ class Form
|
||||
public function getOptionType($option_name)
|
||||
{
|
||||
$key = ltrim(
|
||||
/*overload*/mb_substr($option_name, /*overload*/mb_strrpos($option_name, '/')),
|
||||
/*overload*/mb_substr(
|
||||
$option_name,
|
||||
/*overload*/mb_strrpos($option_name, '/')
|
||||
),
|
||||
'/'
|
||||
);
|
||||
return isset($this->_fieldsTypes[$key])
|
||||
|
||||
@ -515,13 +515,21 @@ function PMA_checkPageValidity(&$page, $whitelist)
|
||||
return true;
|
||||
}
|
||||
|
||||
$_page = /*overload*/mb_substr($page, 0, /*overload*/mb_strpos($page . '?', '?'));
|
||||
$_page = /*overload*/mb_substr(
|
||||
$page,
|
||||
0,
|
||||
/*overload*/mb_strpos($page . '?', '?')
|
||||
);
|
||||
if (in_array($_page, $whitelist)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$_page = urldecode($page);
|
||||
$_page = /*overload*/mb_substr($_page, 0, /*overload*/mb_strpos($_page . '?', '?'));
|
||||
$_page = /*overload*/mb_substr(
|
||||
$_page,
|
||||
0,
|
||||
/*overload*/mb_strpos($_page . '?', '?')
|
||||
);
|
||||
if (in_array($_page, $whitelist)) {
|
||||
return true;
|
||||
}
|
||||
@ -1032,7 +1040,7 @@ function PMA_setPostAsGlobal($post_patterns)
|
||||
/**
|
||||
* Creates some globals from $_REQUEST
|
||||
*
|
||||
* @param string $param db|table
|
||||
* @param string $param db|table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@ -365,7 +365,7 @@ function PMA_closeExportFile($file_handle, $dump_buffer, $save_filename)
|
||||
$write_result = @fwrite($file_handle, $dump_buffer);
|
||||
fclose($file_handle);
|
||||
if (/*overload*/mb_strlen($dump_buffer) > 0
|
||||
&& (! $write_result || ($write_result != /*overload*/mb_strlen($dump_buffer)))
|
||||
&& (! $write_result || $write_result != /*overload*/mb_strlen($dump_buffer))
|
||||
) {
|
||||
$message = new PMA_Message(
|
||||
__('Insufficient space to save the file %s.'),
|
||||
|
||||
@ -338,7 +338,11 @@ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry
|
||||
$wkt = $data['wkt'];
|
||||
|
||||
// Trim to remove leading 'GEOMETRYCOLLECTION(' and trailing ')'
|
||||
$goem_col = /*overload*/mb_substr($wkt, 19, (/*overload*/mb_strlen($wkt) - 20));
|
||||
$goem_col = /*overload*/mb_substr(
|
||||
$wkt,
|
||||
19,
|
||||
/*overload*/mb_strlen($wkt) - 20
|
||||
);
|
||||
// Split the geometry collection object to get its constituents.
|
||||
$sub_parts = $this->_explodeGeomCol($goem_col);
|
||||
$params['GEOMETRYCOLLECTION']['geom_count'] = count($sub_parts);
|
||||
|
||||
@ -303,7 +303,11 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
// Trim to remove leading 'LINESTRING(' and trailing ')'
|
||||
$linestring = /*overload*/mb_substr($wkt, 11, (/*overload*/mb_strlen($wkt) - 12));
|
||||
$linestring = /*overload*/mb_substr(
|
||||
$wkt,
|
||||
11,
|
||||
/*overload*/mb_strlen($wkt) - 12
|
||||
);
|
||||
$points_arr = $this->extractPoints($linestring, null);
|
||||
|
||||
$no_of_points = count($points_arr);
|
||||
|
||||
@ -56,7 +56,11 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
public function scaleRow($spatial)
|
||||
{
|
||||
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
|
||||
$multipoint = /*overload*/mb_substr($spatial, 11, /*overload*/mb_strlen($spatial) - 12);
|
||||
$multipoint = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
11,
|
||||
/*overload*/mb_strlen($spatial) - 12
|
||||
);
|
||||
return $this->setMinMax($multipoint, array());
|
||||
}
|
||||
|
||||
|
||||
@ -389,7 +389,11 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
&& trim($data_row[$k][$i][$j]['y']) != '')
|
||||
? $data_row[$k][$i][$j]['y'] : $empty) . ',';
|
||||
}
|
||||
$wkt = /*overload*/mb_substr($wkt, 0, /*overload*/mb_strlen($wkt) - 1);
|
||||
$wkt = /*overload*/mb_substr(
|
||||
$wkt,
|
||||
0,
|
||||
/*overload*/mb_strlen($wkt) - 1
|
||||
);
|
||||
$wkt .= '),';
|
||||
}
|
||||
$wkt = /*overload*/mb_substr($wkt, 0, /*overload*/mb_strlen($wkt) - 1);
|
||||
@ -473,7 +477,11 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
foreach ($row_data['parts'][$j]['points'] as $innerPoint) {
|
||||
$wkt .= $innerPoint['x'] . ' ' . $innerPoint['y'] . ',';
|
||||
}
|
||||
$wkt = /*overload*/mb_substr($wkt, 0, /*overload*/mb_strlen($wkt) - 1);
|
||||
$wkt = /*overload*/mb_substr(
|
||||
$wkt,
|
||||
0,
|
||||
/*overload*/mb_strlen($wkt) - 1
|
||||
);
|
||||
$wkt .= ')'; // end of inner ring
|
||||
}
|
||||
}
|
||||
@ -509,7 +517,11 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
|
||||
$multipolygon = /*overload*/mb_substr($wkt, 15, /*overload*/mb_strlen($wkt) - 18);
|
||||
$multipolygon = /*overload*/mb_substr(
|
||||
$wkt,
|
||||
15,
|
||||
/*overload*/mb_strlen($wkt) - 18
|
||||
);
|
||||
// Separate each polygon
|
||||
$polygons = explode(")),((", $multipolygon);
|
||||
|
||||
|
||||
@ -56,7 +56,11 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
public function scaleRow($spatial)
|
||||
{
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = /*overload*/mb_substr($spatial, 6, /*overload*/mb_strlen($spatial) - 7);
|
||||
$point = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
6,
|
||||
/*overload*/mb_strlen($spatial) - 7
|
||||
);
|
||||
return $this->setMinMax($point, array());
|
||||
}
|
||||
|
||||
@ -83,7 +87,11 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = /*overload*/mb_substr($spatial, 6, /*overload*/mb_strlen($spatial) - 7);
|
||||
$point = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
6,
|
||||
/*overload*/mb_strlen($spatial) - 7
|
||||
);
|
||||
$points_arr = $this->extractPoints($point, $scale_data);
|
||||
|
||||
// draw a small circle to mark the point
|
||||
@ -124,7 +132,11 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
$line = array('width' => 1.25, 'color' => array($red, $green, $blue));
|
||||
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = /*overload*/mb_substr($spatial, 6, /*overload*/mb_strlen($spatial) - 7);
|
||||
$point = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
6,
|
||||
/*overload*/mb_strlen($spatial) - 7
|
||||
);
|
||||
$points_arr = $this->extractPoints($point, $scale_data);
|
||||
|
||||
// draw a small circle to mark the point
|
||||
@ -165,7 +177,11 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
);
|
||||
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = /*overload*/mb_substr($spatial, 6, /*overload*/mb_strlen($spatial) - 7);
|
||||
$point = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
6,
|
||||
/*overload*/mb_strlen($spatial) - 7
|
||||
);
|
||||
$points_arr = $this->extractPoints($point, $scale_data);
|
||||
|
||||
$row = '';
|
||||
@ -212,7 +228,11 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
$result = $this->getBoundsForOl($srid, $scale_data);
|
||||
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = /*overload*/mb_substr($spatial, 6, /*overload*/mb_strlen($spatial) - 7);
|
||||
$point = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
6,
|
||||
/*overload*/mb_strlen($spatial) - 7
|
||||
);
|
||||
$points_arr = $this->extractPoints($point, null);
|
||||
|
||||
if ($points_arr[0][0] != '' && $points_arr[0][1] != '') {
|
||||
|
||||
@ -152,7 +152,11 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
$color = array($red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'POLYGON((' and trailing '))'
|
||||
$polygon = /*overload*/mb_substr($spatial, 9, /*overload*/mb_strlen($spatial) - 11);
|
||||
$polygon = /*overload*/mb_substr(
|
||||
$spatial,
|
||||
9,
|
||||
/*overload*/mb_strlen($spatial) - 11
|
||||
);
|
||||
|
||||
// If the polygon doesn't have an inner polygon
|
||||
if (/*overload*/mb_strpos($polygon, "),(") === false) {
|
||||
@ -554,8 +558,8 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
// Trim to remove leading 'POLYGON((' and trailing '))'
|
||||
$polygon = /*overload*/mb_substr($wkt, 9, (/*overload*/mb_strlen($wkt) - 11));
|
||||
// Seperate each linestring
|
||||
$polygon = /*overload*/mb_substr($wkt, 9, /*overload*/mb_strlen($wkt) - 11);
|
||||
// Separate each linestring
|
||||
$linerings = explode("),(", $polygon);
|
||||
$params[$index]['POLYGON']['no_of_lines'] = count($linerings);
|
||||
|
||||
|
||||
@ -126,8 +126,6 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false,
|
||||
);
|
||||
$error = true;
|
||||
} else {
|
||||
|
||||
|
||||
$executed_queries++;
|
||||
|
||||
$pattern = '/^[\s]*(SELECT|SHOW|HANDLER)/i';
|
||||
@ -379,7 +377,10 @@ function PMA_importGetNextChunk($size = 32768)
|
||||
break;
|
||||
case 'application/zip':
|
||||
$result = /*overload*/mb_substr($GLOBALS['import_text'], 0, $size);
|
||||
$GLOBALS['import_text'] = /*overload*/mb_substr($GLOBALS['import_text'], $size);
|
||||
$GLOBALS['import_text'] = /*overload*/mb_substr(
|
||||
$GLOBALS['import_text'],
|
||||
$size
|
||||
);
|
||||
$GLOBALS['finished'] = empty($GLOBALS['import_text']);
|
||||
break;
|
||||
case 'none':
|
||||
|
||||
@ -226,10 +226,17 @@ function PMA_getQueryStrFromSelected(
|
||||
|
||||
case 'replace_prefix_tbl':
|
||||
$current = $selected[$i];
|
||||
$subFromPrefix = /*overload*/mb_substr($current, 0, /*overload*/mb_strlen($from_prefix));
|
||||
$subFromPrefix = /*overload*/mb_substr(
|
||||
$current,
|
||||
0,
|
||||
/*overload*/mb_strlen($from_prefix)
|
||||
);
|
||||
if ($subFromPrefix == $from_prefix) {
|
||||
$newtablename = $to_prefix
|
||||
. /*overload*/mb_substr($current, /*overload*/mb_strlen($from_prefix));
|
||||
. /*overload*/mb_substr(
|
||||
$current,
|
||||
/*overload*/mb_strlen($from_prefix)
|
||||
);
|
||||
} else {
|
||||
$newtablename = $current;
|
||||
}
|
||||
|
||||
@ -193,7 +193,10 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = null)
|
||||
$default = PMA_pluginGetDefault($section, $cfgname);
|
||||
foreach ($list as $plugin) {
|
||||
$plugin_name = /*overload*/mb_strtolower(
|
||||
/*overload*/mb_substr(get_class($plugin), /*overload*/mb_strlen($section))
|
||||
/*overload*/mb_substr(
|
||||
get_class($plugin),
|
||||
/*overload*/mb_strlen($section)
|
||||
)
|
||||
);
|
||||
$ret .= '<option';
|
||||
// If the form is being repopulated using $_GET data, that is priority
|
||||
@ -219,7 +222,10 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = null)
|
||||
// Whether each plugin has to be saved as a file
|
||||
foreach ($list as $plugin) {
|
||||
$plugin_name = /*overload*/mb_strtolower(
|
||||
/*overload*/mb_substr(get_class($plugin), /*overload*/mb_strlen($section))
|
||||
/*overload*/mb_substr(
|
||||
get_class($plugin),
|
||||
/*overload*/mb_strlen($section)
|
||||
)
|
||||
);
|
||||
$ret .= '<input type="hidden" id="force_file_' . $plugin_name
|
||||
. '" value="';
|
||||
@ -512,7 +518,10 @@ function PMA_pluginGetOptions($section, &$list)
|
||||
}
|
||||
|
||||
$plugin_name = /*overload*/mb_strtolower(
|
||||
/*overload*/mb_substr(get_class($plugin), /*overload*/mb_strlen($section))
|
||||
/*overload*/mb_substr(
|
||||
get_class($plugin),
|
||||
/*overload*/mb_strlen($section)
|
||||
)
|
||||
);
|
||||
$ret .= '<div id="' . $plugin_name
|
||||
. '_options" class="format_specific_options">';
|
||||
|
||||
@ -142,12 +142,14 @@ class ImportMediawiki extends ImportPlugin
|
||||
$matches = array();
|
||||
|
||||
// Check beginning of comment
|
||||
if (! strcmp(/*overload*/mb_substr($cur_buffer_line, 0, 4), "<!--")) {
|
||||
if (! strcmp(/*overload*/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(/*overload*/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
|
||||
// skip structure tables)
|
||||
@ -275,7 +277,8 @@ class ImportMediawiki extends ImportPlugin
|
||||
$cell = trim($cell);
|
||||
$col_start_chars = array( "|", "!");
|
||||
foreach ($col_start_chars as $col_start_char) {
|
||||
if (/*overload*/mb_strpos($cell, $col_start_char) === 0) {
|
||||
if (/*overload*/mb_strpos($cell, $col_start_char) === 0
|
||||
) {
|
||||
$cell = trim(/*overload*/mb_substr($cell, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +108,9 @@ class ImportShp extends ImportPlugin
|
||||
// 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
|
||||
$dbf_file_path,
|
||||
0,
|
||||
/*overload*/mb_strlen($dbf_file_path) - 4
|
||||
) . '.*';
|
||||
$shp->FileName = $file_name;
|
||||
}
|
||||
|
||||
@ -665,7 +665,8 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both')
|
||||
);
|
||||
}
|
||||
|
||||
if (($source == 'both' || $source == 'foreign') && /*overload*/mb_strlen($table)) {
|
||||
if (($source == 'both' || $source == 'foreign') && /*overload*/mb_strlen($table)
|
||||
) {
|
||||
|
||||
$showCreateTableQuery = 'SHOW CREATE TABLE '
|
||||
. PMA_Util::backquote($db) . '.' . PMA_Util::backquote($table);
|
||||
|
||||
@ -379,6 +379,8 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
|
||||
{
|
||||
global $db, $table, $event_status, $event_type, $event_interval;
|
||||
|
||||
$modeToUpper = /*overload*/mb_strtoupper($mode);
|
||||
|
||||
// Escape special characters
|
||||
$need_escape = array(
|
||||
'item_original_name',
|
||||
@ -419,7 +421,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
|
||||
}
|
||||
// Create the output
|
||||
$retval = "";
|
||||
$retval .= "<!-- START " . /*overload*/mb_strtoupper($mode) . " EVENT FORM -->\n\n";
|
||||
$retval .= "<!-- START " . $modeToUpper . " EVENT FORM -->\n\n";
|
||||
$retval .= "<form class='rte_form' action='db_events.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_data;
|
||||
@ -554,7 +556,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
|
||||
$retval .= "</fieldset>\n";
|
||||
}
|
||||
$retval .= "</form>\n\n";
|
||||
$retval .= "<!-- END " . /*overload*/mb_strtoupper($mode) . " EVENT FORM -->\n\n";
|
||||
$retval .= "<!-- END " . $modeToUpper . " EVENT FORM -->\n\n";
|
||||
|
||||
return $retval;
|
||||
} // end PMA_EVN_getEditorForm()
|
||||
|
||||
@ -145,7 +145,9 @@ function PMA_RTN_parseOneParameter($value)
|
||||
if ($parsed_param[$i+1]['type'] == 'alpha_charset'
|
||||
|| $parsed_param[$i+1]['type'] == 'alpha_identifier'
|
||||
) {
|
||||
$param_opts[] = /*overload*/mb_strtolower($parsed_param[$i+1]['data']);
|
||||
$param_opts[] = /*overload*/mb_strtolower(
|
||||
$parsed_param[$i+1]['data']
|
||||
);
|
||||
}
|
||||
} else if ($parsed_param[$i]['type'] == 'alpha_columnAttrib'
|
||||
&& $depth == 0
|
||||
|
||||
@ -324,6 +324,8 @@ function PMA_TRI_getEditorForm($mode, $item)
|
||||
{
|
||||
global $db, $table, $event_manipulations, $action_timings;
|
||||
|
||||
$modeToUpper = /*overload*/mb_strtoupper($mode);
|
||||
|
||||
// Escape special characters
|
||||
$need_escape = array(
|
||||
'item_original_name',
|
||||
@ -346,7 +348,7 @@ function PMA_TRI_getEditorForm($mode, $item)
|
||||
|
||||
// Create the output
|
||||
$retval = "";
|
||||
$retval .= "<!-- START " . /*overload*/mb_strtoupper($mode) . " TRIGGER FORM -->\n\n";
|
||||
$retval .= "<!-- START " . $modeToUpper . " TRIGGER FORM -->\n\n";
|
||||
$retval .= "<form class='rte_form' action='db_triggers.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_data;
|
||||
@ -429,7 +431,7 @@ function PMA_TRI_getEditorForm($mode, $item)
|
||||
$retval .= "</fieldset>\n";
|
||||
}
|
||||
$retval .= "</form>\n\n";
|
||||
$retval .= "<!-- END " . /*overload*/mb_strtoupper($mode) . " TRIGGER FORM -->\n\n";
|
||||
$retval .= "<!-- END " . $modeToUpper . " TRIGGER FORM -->\n\n";
|
||||
|
||||
return $retval;
|
||||
} // end PMA_TRI_getEditorForm()
|
||||
|
||||
@ -2220,7 +2220,7 @@ function PMA_getHtmlListOfPrivs(
|
||||
/**
|
||||
* Returns edit, revoke or export link for a user.
|
||||
*
|
||||
* @param string $linktype The link type (edit | revoke | export)
|
||||
* @param string $linktype The link type (edit | revoke | export)
|
||||
* @param string $username User name
|
||||
* @param string $hostname Host name
|
||||
* @param string $dbname Database name
|
||||
@ -2425,7 +2425,9 @@ function PMA_getExtraDataForAjaxBehavior(
|
||||
* Generate the string for this alphabet's initial, to update the user
|
||||
* pagination
|
||||
*/
|
||||
$new_user_initial = /*overload*/mb_strtoupper(/*overload*/mb_substr($username, 0, 1));
|
||||
$new_user_initial = /*overload*/mb_strtoupper(
|
||||
/*overload*/mb_substr($username, 0, 1)
|
||||
);
|
||||
$newUserInitialString = '<a href="server_privileges.php'
|
||||
. PMA_URL_getCommon(array('initial' => $new_user_initial)) . '">'
|
||||
. $new_user_initial . '</a>';
|
||||
@ -2686,14 +2688,17 @@ function PMA_getHtmlForUserRights($db_rights, $dbname,
|
||||
$odd_row = true;
|
||||
//while ($row = $GLOBALS['dbi']->fetchAssoc($res)) {
|
||||
foreach ($db_rights as $row) {
|
||||
$found_rows[] = (!/*overload*/mb_strlen($dbname))
|
||||
$dbNameLength = /*overload*/mb_strlen($dbname);
|
||||
$found_rows[] = (!$dbNameLength)
|
||||
? $row['Db']
|
||||
: $row['Table_name'];
|
||||
|
||||
$html_output .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n"
|
||||
. '<td>'
|
||||
. htmlspecialchars(
|
||||
(!/*overload*/mb_strlen($dbname)) ? $row['Db'] : $row['Table_name']
|
||||
(!$dbNameLength)
|
||||
? $row['Db']
|
||||
: $row['Table_name']
|
||||
)
|
||||
. '</td>' . "\n"
|
||||
. '<td><code>' . "\n"
|
||||
@ -2704,8 +2709,8 @@ function PMA_getHtmlForUserRights($db_rights, $dbname,
|
||||
) . "\n"
|
||||
. '</code></td>' . "\n"
|
||||
. '<td>'
|
||||
. ((((!/*overload*/mb_strlen($dbname)) && $row['Grant_priv'] == 'Y')
|
||||
|| (/*overload*/mb_strlen($dbname)
|
||||
. ((((!$dbNameLength) && $row['Grant_priv'] == 'Y')
|
||||
|| ($dbNameLength
|
||||
&& in_array('Grant', explode(',', $row['Table_priv']))))
|
||||
? __('Yes')
|
||||
: __('No'))
|
||||
@ -2722,8 +2727,8 @@ function PMA_getHtmlForUserRights($db_rights, $dbname,
|
||||
'edit',
|
||||
$username,
|
||||
$hostname,
|
||||
(!/*overload*/mb_strlen($dbname)) ? $row['Db'] : $dbname,
|
||||
(!/*overload*/mb_strlen($dbname)) ? '' : $row['Table_name']
|
||||
(!$dbNameLength) ? $row['Db'] : $dbname,
|
||||
(!$dbNameLength) ? '' : $row['Table_name']
|
||||
);
|
||||
$html_output .= '</td>' . "\n"
|
||||
. ' <td>';
|
||||
@ -2735,8 +2740,8 @@ function PMA_getHtmlForUserRights($db_rights, $dbname,
|
||||
'revoke',
|
||||
$username,
|
||||
$hostname,
|
||||
(! /*overload*/mb_strlen($dbname)) ? $row['Db'] : $dbname,
|
||||
(! /*overload*/mb_strlen($dbname)) ? '' : $row['Table_name']
|
||||
(!$dbNameLength) ? $row['Db'] : $dbname,
|
||||
(!$dbNameLength) ? '' : $row['Table_name']
|
||||
);
|
||||
}
|
||||
$html_output .= '</td>' . "\n"
|
||||
|
||||
@ -1242,7 +1242,9 @@ function PMA_SQP_analyze($arr)
|
||||
if ($arr[$i]['type'] == 'alpha_reservedWord') {
|
||||
// We don't know what type of query yet, so run this
|
||||
if ($subresult['querytype'] == '') {
|
||||
$subresult['querytype'] = /*overload*/mb_strtoupper($arr[$i]['data']);
|
||||
$subresult['querytype'] = /*overload*/mb_strtoupper(
|
||||
$arr[$i]['data']
|
||||
);
|
||||
} // end if (querytype was empty)
|
||||
|
||||
// Check if we support this type of query
|
||||
@ -2127,7 +2129,9 @@ function PMA_SQP_analyze($arr)
|
||||
if (isset($arr[$i+1])
|
||||
&& $arr[$i+1]['type'] == 'alpha_reservedWord'
|
||||
) {
|
||||
$second_upper_data = /*overload*/mb_strtoupper($arr[$i+1]['data']);
|
||||
$second_upper_data = /*overload*/mb_strtoupper(
|
||||
$arr[$i+1]['data']
|
||||
);
|
||||
if ($second_upper_data == 'DELETE') {
|
||||
$clause = 'on_delete';
|
||||
}
|
||||
@ -2143,7 +2147,9 @@ function PMA_SQP_analyze($arr)
|
||||
|| ($arr[$i+2]['type'] == 'alpha_identifier'
|
||||
&& /*overload*/mb_strtoupper($arr[$i+2]['data'])=='NO'))
|
||||
) {
|
||||
$third_upper_data = /*overload*/mb_strtoupper($arr[$i+2]['data']);
|
||||
$third_upper_data = /*overload*/mb_strtoupper(
|
||||
$arr[$i+2]['data']
|
||||
);
|
||||
if ($third_upper_data == 'CASCADE'
|
||||
|| $third_upper_data == 'RESTRICT'
|
||||
) {
|
||||
@ -2159,7 +2165,9 @@ function PMA_SQP_analyze($arr)
|
||||
if ($clause == 'on_update'
|
||||
&& $in_timestamp_options
|
||||
) {
|
||||
$create_table_fields[$current_identifier]['on_update_current_timestamp'] = true;
|
||||
$create_table_fields[$current_identifier]
|
||||
['on_update_current_timestamp']
|
||||
= true;
|
||||
$seen_default = false;
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* If mb_* functions don't exist, we create the ones we need and they'll use the
|
||||
* standard string functions.
|
||||
* All mb_* functions created by pMA should behave as mb_* functions.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
|
||||
@ -926,12 +926,14 @@ function PMA_getHtmlForColumnIndexes($columnNumber, $ci, $ci_offset, $columnMeta
|
||||
|
||||
function PMA_getHtmlForIndexTypeOption($columnNumber, $columnMeta, $type, $key)
|
||||
{
|
||||
$html = '<option value="' . /*overload*/mb_strtolower($type) . '_' . $columnNumber
|
||||
$typeToLower = /*overload*/mb_strtolower($type);
|
||||
$typeToUpper = /*overload*/mb_strtoupper($type);
|
||||
$html = '<option value="' . $typeToLower . '_' . $columnNumber
|
||||
. '" title="' . __($type) . '"';
|
||||
if (isset($columnMeta['Key']) && $columnMeta['Key'] == $key) {
|
||||
$html .= ' selected="selected"';
|
||||
}
|
||||
$html .= '>' . /*overload*/mb_strtoupper($type) . '</option>';
|
||||
$html .= '>' . $typeToUpper . '</option>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -311,8 +311,9 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
|
||||
$row = @$GLOBALS['dbi']->fetchAssoc($test_rs);
|
||||
$GLOBALS['dbi']->freeResult($test_rs);
|
||||
|
||||
$transformationLength = /*overload*/mb_strlen($transformation);
|
||||
if (! $forcedelete
|
||||
&& (/*overload*/mb_strlen($mimetype) || /*overload*/mb_strlen($transformation)
|
||||
&& (/*overload*/mb_strlen($mimetype) || $transformationLength
|
||||
|| /*overload*/mb_strlen($transformationOpts)
|
||||
|| /*overload*/mb_strlen($row['comment']))
|
||||
) {
|
||||
|
||||
4
sql.php
4
sql.php
@ -113,7 +113,9 @@ if (isset($_REQUEST['set_col_prefs']) && $_REQUEST['set_col_prefs'] == true) {
|
||||
|
||||
// Default to browse if no query set and we have table
|
||||
// (needed for browsing from DefaultTabTable)
|
||||
if (empty($sql_query) && /*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) {
|
||||
$tableLength = /*overload*/mb_strlen($table);
|
||||
$dbLength = /*overload*/mb_strlen($db);
|
||||
if (empty($sql_query) && $tableLength && $dbLength) {
|
||||
$sql_query = PMA_getDefaultSqlQueryForBrowse($db, $table);
|
||||
|
||||
// set $goto to what will be displayed if query returns 0 rows
|
||||
|
||||
@ -9,9 +9,6 @@
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/tbl_chart.lib.php';
|
||||
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
|
||||
/*
|
||||
* Execute the query and return the result
|
||||
*/
|
||||
@ -21,8 +18,9 @@ if (isset($_REQUEST['ajax_request'])
|
||||
) {
|
||||
$response = PMA_Response::getInstance();
|
||||
|
||||
if (/*overload*/mb_strlen($GLOBALS['table']) && /*overload*/mb_strlen($GLOBALS['db'])
|
||||
) {
|
||||
$tableLength = /*overload*/mb_strlen($GLOBALS['table']);
|
||||
$dbLength = /*overload*/mb_strlen($GLOBALS['db']);
|
||||
if ($tableLength && $dbLength) {
|
||||
include './libraries/tbl_common.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -31,16 +31,13 @@ require_once 'libraries/tbl_printview.lib.php';
|
||||
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
if (/*overload*/mb_strlen($table)) {
|
||||
$err_url = 'tbl_sql.php?' . PMA_URL_getCommon(array(
|
||||
'db' => $db, 'table' => $table
|
||||
));
|
||||
$err_url = 'tbl_sql.php?' . PMA_URL_getCommon(
|
||||
array('db' => $db, 'table' => $table)
|
||||
);
|
||||
} else {
|
||||
$err_url = 'db_sql.php' . PMA_URL_getCommon(array('db' => $db));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user