Coding style improvements - Multiline assignments
This commit is contained in:
parent
a7c00f719f
commit
35b18e57a2
@ -223,22 +223,23 @@ if (is_array($foreignData['disp_row'])) {
|
||||
$val_ordered_current_val = htmlspecialchars($val_ordered_current_val);
|
||||
$val_ordered_current_val_title = '';
|
||||
} else {
|
||||
$val_ordered_current_val_title =
|
||||
htmlspecialchars($val_ordered_current_val);
|
||||
$val_ordered_current_val_title
|
||||
= htmlspecialchars($val_ordered_current_val);
|
||||
$val_ordered_current_val = htmlspecialchars(
|
||||
PMA_substr($val_ordered_current_val, 0, $cfg['LimitChars'])
|
||||
. '...'
|
||||
);
|
||||
);
|
||||
}
|
||||
if (PMA_strlen($key_ordered_current_val) <= $cfg['LimitChars']) {
|
||||
$key_ordered_current_val = htmlspecialchars($key_ordered_current_val);
|
||||
$key_ordered_current_val_title = '';
|
||||
} else {
|
||||
$key_ordered_current_val_title =
|
||||
htmlspecialchars($key_ordered_current_val);
|
||||
$key_ordered_current_val =
|
||||
htmlspecialchars(PMA_substr($key_ordered_current_val, 0,
|
||||
$cfg['LimitChars']) . '...');
|
||||
$key_ordered_current_val_title
|
||||
= htmlspecialchars($key_ordered_current_val);
|
||||
$key_ordered_current_val
|
||||
= htmlspecialchars(
|
||||
PMA_substr($key_ordered_current_val, 0, $cfg['LimitChars']) . '...'
|
||||
);
|
||||
}
|
||||
|
||||
if (! empty($data)) {
|
||||
|
||||
@ -314,8 +314,8 @@ foreach ($tables_names_only as $each_table) {
|
||||
} // end while
|
||||
|
||||
echo ' </select>' . "\n";
|
||||
$alter_select =
|
||||
'<a href="db_search.php' . PMA_generate_common_url(array_merge($url_params, array('selectall' => 1))) . '#db_search"'
|
||||
$alter_select
|
||||
= '<a href="db_search.php' . PMA_generate_common_url(array_merge($url_params, array('selectall' => 1))) . '#db_search"'
|
||||
. ' onclick="setSelectOptions(\'db_search\', \'table_select[]\', true); return false;">' . __('Select All') . '</a>'
|
||||
. ' / '
|
||||
. '<a href="db_search.php' . PMA_generate_common_url(array_merge($url_params, array('unselectall' => 1))) . '#db_search"'
|
||||
|
||||
@ -496,8 +496,8 @@ foreach ($tables as $keyname => $each_table) {
|
||||
// Show Summary
|
||||
if ($is_show_stats) {
|
||||
list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
|
||||
list($overhead_formatted, $overhead_unit) =
|
||||
PMA_formatByteDown($overhead_size, 3, 1);
|
||||
list($overhead_formatted, $overhead_unit)
|
||||
= PMA_formatByteDown($overhead_size, 3, 1);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
@ -958,8 +958,8 @@ class PMA_Config
|
||||
if (substr($pma_absolute_uri, 0, 7) != 'http://'
|
||||
&& substr($pma_absolute_uri, 0, 8) != 'https://'
|
||||
) {
|
||||
$pma_absolute_uri =
|
||||
($is_https ? 'https' : 'http')
|
||||
$pma_absolute_uri
|
||||
= ($is_https ? 'https' : 'http')
|
||||
. ':' . (substr($pma_absolute_uri, 0, 2) == '//' ? '' : '//')
|
||||
. $pma_absolute_uri;
|
||||
}
|
||||
|
||||
@ -76,9 +76,9 @@ class PMA_RecentTable
|
||||
public function getFromDb()
|
||||
{
|
||||
// Read from phpMyAdmin database, if recent tables is not in session
|
||||
$sql_query =
|
||||
" SELECT `tables` FROM " . $this->pma_table .
|
||||
" WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'";
|
||||
$sql_query
|
||||
= " SELECT `tables` FROM " . $this->pma_table .
|
||||
" WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'";
|
||||
|
||||
$row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
|
||||
if (isset($row[0])) {
|
||||
@ -91,15 +91,15 @@ class PMA_RecentTable
|
||||
/**
|
||||
* Save recent tables into phpMyAdmin database.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return true|PMA_Message
|
||||
*/
|
||||
public function saveToDb()
|
||||
{
|
||||
$username = $GLOBALS['cfg']['Server']['user'];
|
||||
$sql_query =
|
||||
" REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
|
||||
" VALUES ('" . $username . "', '" . PMA_sqlAddSlashes(json_encode($this->tables)) . "')";
|
||||
$sql_query
|
||||
= " REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
|
||||
" VALUES ('" . $username . "', '" . PMA_sqlAddSlashes(json_encode($this->tables)) . "')";
|
||||
|
||||
$success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']);
|
||||
|
||||
@ -163,7 +163,7 @@ class PMA_RecentTable
|
||||
$html .= '<select name="selected_recent_table" id="recentTable">';
|
||||
$html .= $this->getHtmlSelectOption();
|
||||
$html .= '</select>';
|
||||
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
@ -274,8 +274,8 @@ class PMA_StorageEngine
|
||||
if (!empty($storage_engines[$engine])) {
|
||||
$this->engine = $engine;
|
||||
$this->title = $storage_engines[$engine]['Engine'];
|
||||
$this->comment =
|
||||
(isset($storage_engines[$engine]['Comment'])
|
||||
$this->comment
|
||||
= (isset($storage_engines[$engine]['Comment'])
|
||||
? $storage_engines[$engine]['Comment']
|
||||
: '');
|
||||
switch ($storage_engines[$engine]['Support']) {
|
||||
|
||||
@ -1391,8 +1391,8 @@ class PMA_Table
|
||||
$max_rows = $GLOBALS['cfg']['Server']['MaxTableUiprefs'];
|
||||
if ($rows_count > $max_rows) {
|
||||
$num_rows_to_delete = $rows_count - $max_rows;
|
||||
$sql_query =
|
||||
' DELETE FROM ' . $pma_table .
|
||||
$sql_query
|
||||
= ' DELETE FROM ' . $pma_table .
|
||||
' ORDER BY last_update ASC' .
|
||||
' LIMIT ' . $num_rows_to_delete;
|
||||
$success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']);
|
||||
|
||||
@ -942,9 +942,12 @@ function PMA_DBI_get_columns_full($database = null, $table = null,
|
||||
$columns[$column_name]['TABLE_SCHEMA'] = $database;
|
||||
$columns[$column_name]['TABLE_NAME'] = $table;
|
||||
$columns[$column_name]['ORDINAL_POSITION'] = $ordinal_position;
|
||||
$columns[$column_name]['DATA_TYPE'] =
|
||||
substr($columns[$column_name]['COLUMN_TYPE'], 0,
|
||||
strpos($columns[$column_name]['COLUMN_TYPE'], '('));
|
||||
$columns[$column_name]['DATA_TYPE']
|
||||
= substr(
|
||||
$columns[$column_name]['COLUMN_TYPE'],
|
||||
0,
|
||||
strpos($columns[$column_name]['COLUMN_TYPE'], '(')
|
||||
);
|
||||
/**
|
||||
* @todo guess CHARACTER_MAXIMUM_LENGTH from COLUMN_TYPE
|
||||
*/
|
||||
@ -955,9 +958,12 @@ function PMA_DBI_get_columns_full($database = null, $table = null,
|
||||
$columns[$column_name]['CHARACTER_OCTET_LENGTH'] = null;
|
||||
$columns[$column_name]['NUMERIC_PRECISION'] = null;
|
||||
$columns[$column_name]['NUMERIC_SCALE'] = null;
|
||||
$columns[$column_name]['CHARACTER_SET_NAME'] =
|
||||
substr($columns[$column_name]['COLLATION_NAME'], 0,
|
||||
strpos($columns[$column_name]['COLLATION_NAME'], '_'));
|
||||
$columns[$column_name]['CHARACTER_SET_NAME']
|
||||
= substr(
|
||||
$columns[$column_name]['COLLATION_NAME'],
|
||||
0,
|
||||
strpos($columns[$column_name]['COLLATION_NAME'], '_')
|
||||
);
|
||||
|
||||
$ordinal_position++;
|
||||
}
|
||||
|
||||
@ -36,50 +36,50 @@ if (isset($plugin_list)) {
|
||||
);
|
||||
|
||||
/* what to dump (structure/data/both) */
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'begin_group', 'name' => 'dump_what', 'text' => __('Dump table'));
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'begin_group', 'name' => 'dump_what', 'text' => __('Dump table'));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
|
||||
$plugin_list['latex']['options'][] = array('type' => 'end_group');
|
||||
|
||||
/* Structure options */
|
||||
if (!$hide_structure) {
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'structure_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'structure_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'structure_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'structure_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'structure_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'structure_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
|
||||
if (!empty($GLOBALS['cfgRelation']['relation'])) {
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
|
||||
}
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
|
||||
if (!empty($GLOBALS['cfgRelation']['mimework'])) {
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
|
||||
}
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'end_group');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'end_group');
|
||||
}
|
||||
/* Data */
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'data_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'data_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'data_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
|
||||
$plugin_list['latex']['options'][] =
|
||||
array('type' => 'end_group');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'data_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'data_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'data_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
|
||||
$plugin_list['latex']['options'][]
|
||||
= array('type' => 'end_group');
|
||||
} else {
|
||||
|
||||
/**
|
||||
|
||||
@ -28,38 +28,38 @@ if (isset($plugin_list)) {
|
||||
);
|
||||
|
||||
/* what to dump (structure/data/both) */
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'begin_group', 'text' => __('Dump table') , 'name' => 'general_opts');
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'begin_group', 'text' => __('Dump table') , 'name' => 'general_opts');
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
|
||||
$plugin_list['odt']['options'][] = array('type' => 'end_group');
|
||||
|
||||
/* Structure options */
|
||||
if (!$hide_structure) {
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
|
||||
if (!empty($GLOBALS['cfgRelation']['relation'])) {
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
|
||||
}
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
|
||||
if (!empty($GLOBALS['cfgRelation']['mimework'])) {
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
|
||||
}
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'end_group');
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'end_group');
|
||||
}
|
||||
/* Data */
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
|
||||
$plugin_list['odt']['options'][] =
|
||||
array('type' => 'end_group');
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
|
||||
$plugin_list['odt']['options'][]
|
||||
= array('type' => 'end_group');
|
||||
} else {
|
||||
|
||||
$GLOBALS['odt_buffer'] = '';
|
||||
|
||||
@ -254,8 +254,8 @@ class PMA_GIS_Visualization
|
||||
{
|
||||
$this->init();
|
||||
$scale_data = $this->_scaleDataSet($this->_data);
|
||||
$output =
|
||||
'var options = {'
|
||||
$output
|
||||
= 'var options = {'
|
||||
. 'projection: new OpenLayers.Projection("EPSG:900913"),'
|
||||
. 'displayProjection: new OpenLayers.Projection("EPSG:4326"),'
|
||||
. 'units: "m",'
|
||||
|
||||
@ -34,12 +34,12 @@ if (isset($plugin_list)) {
|
||||
);
|
||||
|
||||
if ($plugin_param !== 'table') {
|
||||
$plugin_list['csv']['options'][] =
|
||||
array('type' => 'bool', 'name' => 'col_names', 'text' => __('The first line of the file contains the table column names <i>(if this is unchecked, the first line will become part of the data)</i>'));
|
||||
$plugin_list['csv']['options'][]
|
||||
= array('type' => 'bool', 'name' => 'col_names', 'text' => __('The first line of the file contains the table column names <i>(if this is unchecked, the first line will become part of the data)</i>'));
|
||||
} else {
|
||||
$hint = new PMA_Message(__('If the data in each row of the file is not in the same order as in the database, list the corresponding column names here. Column names must be separated by commas and not enclosed in quotations.'));
|
||||
$plugin_list['csv']['options'][] =
|
||||
array('type' => 'text', 'name' => 'columns', 'text' => __('Column names: ') . PMA_showHint($hint));
|
||||
$plugin_list['csv']['options'][]
|
||||
= array('type' => 'text', 'name' => 'columns', 'text' => __('Column names: ') . PMA_showHint($hint));
|
||||
}
|
||||
$plugin_list['csv']['options'][] = array('type' => 'end_group');
|
||||
|
||||
|
||||
@ -47,8 +47,8 @@ if (! PMA_cacheExists('mysql_charsets', true)) {
|
||||
}
|
||||
//$mysql_collations_available[$row['Collation']] = ! isset($row['Compiled']) || $row['Compiled'] == 'Yes';
|
||||
$mysql_collations_available[$row['COLLATION_NAME']] = true;
|
||||
$mysql_charsets_available[$row['CHARACTER_SET_NAME']] =
|
||||
!empty($mysql_charsets_available[$row['CHARACTER_SET_NAME']])
|
||||
$mysql_charsets_available[$row['CHARACTER_SET_NAME']]
|
||||
= !empty($mysql_charsets_available[$row['CHARACTER_SET_NAME']])
|
||||
|| !empty($mysql_collations_available[$row['COLLATION_NAME']]);
|
||||
}
|
||||
PMA_DBI_free_result($res);
|
||||
@ -118,8 +118,8 @@ function PMA_generateCharsetDropdownBox($type = PMA_CSDROPDOWN_COLLATION,
|
||||
if (!$mysql_charsets_available[$current_charset]) {
|
||||
continue;
|
||||
}
|
||||
$current_cs_descr =
|
||||
empty($mysql_charsets_descriptions[$current_charset])
|
||||
$current_cs_descr
|
||||
= empty($mysql_charsets_descriptions[$current_charset])
|
||||
? $current_charset
|
||||
: $mysql_charsets_descriptions[$current_charset];
|
||||
|
||||
|
||||
@ -15,8 +15,8 @@ $GLOBALS['PMD']['STYLE'] = 'default';
|
||||
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
$GLOBALS['script_display_field'] =
|
||||
'<script type="text/javascript">' . "\n" .
|
||||
$GLOBALS['script_display_field']
|
||||
= '<script type="text/javascript">' . "\n" .
|
||||
'// <![CDATA[' . "\n" .
|
||||
'var display_field = new Array();' . "\n";
|
||||
|
||||
@ -129,8 +129,8 @@ function get_script_contr()
|
||||
}
|
||||
|
||||
$ti = 0;
|
||||
$script_contr =
|
||||
'<script type="text/javascript">' . "\n" .
|
||||
$script_contr
|
||||
= '<script type="text/javascript">' . "\n" .
|
||||
'// <![CDATA[' . "\n" .
|
||||
'var contr = new Array();' . "\n";
|
||||
for ($i = 0, $cnt = count($con["C_NAME"]); $i < $cnt; $i++) {
|
||||
@ -199,8 +199,8 @@ function get_all_keys($unique_only = false)
|
||||
*/
|
||||
function get_script_tabs()
|
||||
{
|
||||
$script_tabs =
|
||||
'<script type="text/javascript">' . "\n" .
|
||||
$script_tabs
|
||||
= '<script type="text/javascript">' . "\n" .
|
||||
'// <![CDATA[' . "\n" .
|
||||
'var j_tabs = new Array();' . "\n" .
|
||||
'var h_tabs = new Array();' . "\n" ;
|
||||
|
||||
@ -1277,16 +1277,16 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
// we assume for now that this is also the true name
|
||||
$subresult['select_expr'][$current_select_expr]['table_true_name'] = $chain[$size_chain - 2];
|
||||
$subresult['select_expr'][$current_select_expr]['expr']
|
||||
= $subresult['select_expr'][$current_select_expr]['table_name']
|
||||
. '.' . $subresult['select_expr'][$current_select_expr]['expr'];
|
||||
= $subresult['select_expr'][$current_select_expr]['table_name']
|
||||
. '.' . $subresult['select_expr'][$current_select_expr]['expr'];
|
||||
} // end if ($size_chain > 1)
|
||||
|
||||
// maybe a db
|
||||
if ($size_chain > 2) {
|
||||
$subresult['select_expr'][$current_select_expr]['db'] = $chain[$size_chain - 3];
|
||||
$subresult['select_expr'][$current_select_expr]['expr']
|
||||
= $subresult['select_expr'][$current_select_expr]['db']
|
||||
. '.' . $subresult['select_expr'][$current_select_expr]['expr'];
|
||||
= $subresult['select_expr'][$current_select_expr]['db']
|
||||
. '.' . $subresult['select_expr'][$current_select_expr]['expr'];
|
||||
} // end if ($size_chain > 2)
|
||||
unset($chain);
|
||||
|
||||
@ -1336,13 +1336,13 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
// we assume for now that this is also the true name
|
||||
$subresult['table_ref'][$current_table_ref]['table_true_name'] = $chain[$size_chain - 1];
|
||||
$subresult['table_ref'][$current_table_ref]['expr']
|
||||
= $subresult['table_ref'][$current_table_ref]['table_name'];
|
||||
= $subresult['table_ref'][$current_table_ref]['table_name'];
|
||||
// maybe a db
|
||||
if ($size_chain > 1) {
|
||||
$subresult['table_ref'][$current_table_ref]['db'] = $chain[$size_chain - 2];
|
||||
$subresult['table_ref'][$current_table_ref]['expr']
|
||||
= $subresult['table_ref'][$current_table_ref]['db']
|
||||
. '.' . $subresult['table_ref'][$current_table_ref]['expr'];
|
||||
= $subresult['table_ref'][$current_table_ref]['db']
|
||||
. '.' . $subresult['table_ref'][$current_table_ref]['expr'];
|
||||
} // end if ($size_chain > 1)
|
||||
|
||||
// add the table alias into the whole expression
|
||||
@ -1365,10 +1365,11 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
$alias = $subresult['table_ref'][$tr]['table_alias'];
|
||||
$truename = $subresult['table_ref'][$tr]['table_true_name'];
|
||||
for ($se=0; $se <= $current_select_expr; $se++) {
|
||||
if (isset($alias) && strlen($alias) && $subresult['select_expr'][$se]['table_true_name']
|
||||
== $alias) {
|
||||
$subresult['select_expr'][$se]['table_true_name']
|
||||
= $truename;
|
||||
if (isset($alias)
|
||||
&& strlen($alias)
|
||||
&& $subresult['select_expr'][$se]['table_true_name'] == $alias
|
||||
) {
|
||||
$subresult['select_expr'][$se]['table_true_name'] = $truename;
|
||||
} // end if (found the alias)
|
||||
} // end for (select expressions)
|
||||
|
||||
|
||||
@ -340,8 +340,8 @@ for ($i = 0; $i < $num_fields; $i++) {
|
||||
|
||||
// old column default
|
||||
if ($is_backup) {
|
||||
$_form_params['field_default_orig[' . $i . ']'] =
|
||||
(isset($row['Default']) ? $row['Default'] : '');
|
||||
$_form_params['field_default_orig[' . $i . ']']
|
||||
= (isset($row['Default']) ? $row['Default'] : '');
|
||||
}
|
||||
|
||||
// here we put 'NONE' as the default value of drop-down; otherwise
|
||||
|
||||
@ -464,8 +464,8 @@ function PMA_displayDbList($ext_dblist, $offset, $count)
|
||||
} else {
|
||||
$tables = PMA_getTableList($db['name']);
|
||||
}
|
||||
$child_visible =
|
||||
(bool) (count($GLOBALS['pma']->databases) === 1 || $db_start == $db['name']);
|
||||
$child_visible
|
||||
= (bool) (count($GLOBALS['pma']->databases) === 1 || $db_start == $db['name']);
|
||||
PMA_displayTableList($tables, $child_visible, '', $db['name']);
|
||||
} elseif ($GLOBALS['cfg']['LeftFrameLight']) {
|
||||
// no tables and LeftFrameLight:
|
||||
|
||||
@ -1630,8 +1630,8 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
|
||||
|
||||
while ($db_rights_row = PMA_DBI_fetch_assoc($db_rights_result)) {
|
||||
$db_rights_row = array_merge($user_defaults, $db_rights_row);
|
||||
$db_rights[$db_rights_row['User']][$db_rights_row['Host']] =
|
||||
$db_rights_row;
|
||||
$db_rights[$db_rights_row['User']][$db_rights_row['Host']]
|
||||
= $db_rights_row;
|
||||
}
|
||||
PMA_DBI_free_result($db_rights_result);
|
||||
unset($db_rights_sql, $db_rights_sqls, $db_rights_result, $db_rights_row);
|
||||
@ -2260,8 +2260,8 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
|
||||
unset($row, $row1, $row2);
|
||||
|
||||
// now, we build the table...
|
||||
$list_of_privileges =
|
||||
'`User`, '
|
||||
$list_of_privileges
|
||||
= '`User`, '
|
||||
. '`Host`, '
|
||||
. '`Select_priv`, '
|
||||
. '`Insert_priv`, '
|
||||
@ -2281,8 +2281,8 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
|
||||
. '`Alter_routine_priv`, '
|
||||
. '`Execute_priv`';
|
||||
|
||||
$list_of_compared_privileges =
|
||||
'`Select_priv` = \'N\''
|
||||
$list_of_compared_privileges
|
||||
= '`Select_priv` = \'N\''
|
||||
. ' AND `Insert_priv` = \'N\''
|
||||
. ' AND `Update_priv` = \'N\''
|
||||
. ' AND `Delete_priv` = \'N\''
|
||||
|
||||
@ -486,16 +486,16 @@ cleanDeprecated($server_status);
|
||||
if (isset($server_status['Key_blocks_unused'])
|
||||
&& isset($server_variables['key_cache_block_size'])
|
||||
&& isset($server_variables['key_buffer_size'])) {
|
||||
$server_status['Key_buffer_fraction_%'] =
|
||||
100
|
||||
$server_status['Key_buffer_fraction_%']
|
||||
= 100
|
||||
- $server_status['Key_blocks_unused']
|
||||
* $server_variables['key_cache_block_size']
|
||||
/ $server_variables['key_buffer_size']
|
||||
* 100;
|
||||
} elseif (isset($server_status['Key_blocks_used'])
|
||||
&& isset($server_variables['key_buffer_size'])) {
|
||||
$server_status['Key_buffer_fraction_%'] =
|
||||
$server_status['Key_blocks_used']
|
||||
$server_status['Key_buffer_fraction_%']
|
||||
= $server_status['Key_blocks_used']
|
||||
* 1024
|
||||
/ $server_variables['key_buffer_size'];
|
||||
}
|
||||
@ -518,8 +518,8 @@ if (isset($server_status['Threads_created'])
|
||||
&& isset($server_status['Connections'])
|
||||
&& $server_status['Connections'] > 0) {
|
||||
|
||||
$server_status['Threads_cache_hitrate_%'] =
|
||||
100 - $server_status['Threads_created'] / $server_status['Connections'] * 100;
|
||||
$server_status['Threads_cache_hitrate_%']
|
||||
= 100 - $server_status['Threads_created'] / $server_status['Connections'] * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -376,8 +376,8 @@ foreach ($rows as $row_id => $vrow) {
|
||||
$table_fields[$i]['Default'] = null;
|
||||
}
|
||||
|
||||
$table_fields[$i]['len'] =
|
||||
preg_match('@float|double@', $table_fields[$i]['Type']) ? 100 : -1;
|
||||
$table_fields[$i]['len']
|
||||
= preg_match('@float|double@', $table_fields[$i]['Type']) ? 100 : -1;
|
||||
|
||||
|
||||
if (isset($comments_map[$table_fields[$i]['Field']])) {
|
||||
@ -918,11 +918,11 @@ foreach ($rows as $row_id => $vrow) {
|
||||
$fieldsize = $extracted_fieldspec['spec_in_brackets'];
|
||||
} else {
|
||||
/**
|
||||
* This case happens for example for INT or DATE columns;
|
||||
* in these situations, the value returned in $field['len']
|
||||
* This case happens for example for INT or DATE columns;
|
||||
* in these situations, the value returned in $field['len']
|
||||
* seems appropriate.
|
||||
*/
|
||||
$fieldsize = $field['len'];
|
||||
$fieldsize = $field['len'];
|
||||
}
|
||||
$fieldsize = min(max($fieldsize, $cfg['MinSizeForInputField']), $cfg['MaxSizeForInputField']);
|
||||
echo $backup_field . "\n";
|
||||
|
||||
@ -130,8 +130,8 @@ if ($GLOBALS['is_ajax_request'] != true) {
|
||||
|
||||
if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
|
||||
// coming already from form
|
||||
$add_fields =
|
||||
count($_REQUEST['index']['columns']['names']) - $index->getColumnCount();
|
||||
$add_fields
|
||||
= count($_REQUEST['index']['columns']['names']) - $index->getColumnCount();
|
||||
if (isset($_REQUEST['add_fields'])) {
|
||||
$add_fields += $_REQUEST['added_fields'];
|
||||
}
|
||||
|
||||
@ -185,36 +185,36 @@ foreach ($loop_array as $rownumber => $where_clause) {
|
||||
$query_values = array();
|
||||
|
||||
// Map multi-edit keys to single-level arrays, dependent on how we got the fields
|
||||
$me_fields =
|
||||
isset($_REQUEST['fields']['multi_edit'][$rownumber])
|
||||
$me_fields
|
||||
= isset($_REQUEST['fields']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['fields']['multi_edit'][$rownumber]
|
||||
: array();
|
||||
$me_fields_name =
|
||||
isset($_REQUEST['fields_name']['multi_edit'][$rownumber])
|
||||
$me_fields_name
|
||||
= isset($_REQUEST['fields_name']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['fields_name']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
$me_fields_prev =
|
||||
isset($_REQUEST['fields_prev']['multi_edit'][$rownumber])
|
||||
$me_fields_prev
|
||||
= isset($_REQUEST['fields_prev']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['fields_prev']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
$me_funcs =
|
||||
isset($_REQUEST['funcs']['multi_edit'][$rownumber])
|
||||
$me_funcs
|
||||
= isset($_REQUEST['funcs']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['funcs']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
$me_fields_type =
|
||||
isset($_REQUEST['fields_type']['multi_edit'][$rownumber])
|
||||
$me_fields_type
|
||||
= isset($_REQUEST['fields_type']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['fields_type']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
$me_fields_null =
|
||||
isset($_REQUEST['fields_null']['multi_edit'][$rownumber])
|
||||
$me_fields_null
|
||||
= isset($_REQUEST['fields_null']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['fields_null']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
$me_fields_null_prev =
|
||||
isset($_REQUEST['fields_null_prev']['multi_edit'][$rownumber])
|
||||
$me_fields_null_prev
|
||||
= isset($_REQUEST['fields_null_prev']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['fields_null_prev']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
$me_auto_increment =
|
||||
isset($_REQUEST['auto_increment']['multi_edit'][$rownumber])
|
||||
$me_auto_increment
|
||||
= isset($_REQUEST['auto_increment']['multi_edit'][$rownumber])
|
||||
? $_REQUEST['auto_increment']['multi_edit'][$rownumber]
|
||||
: null;
|
||||
|
||||
@ -405,8 +405,10 @@ foreach ($query as $single_query) {
|
||||
} // end if
|
||||
|
||||
foreach (PMA_DBI_get_warnings() as $warning) {
|
||||
$warning_messages[] = PMA_Message::sanitize($warning['Level'] . ': #' . $warning['Code']
|
||||
. ' ' . $warning['Message']);
|
||||
$warning_messages[]
|
||||
= PMA_Message::sanitize(
|
||||
$warning['Level'] . ': #' . $warning['Code'] . ' ' . $warning['Message']
|
||||
);
|
||||
}
|
||||
|
||||
unset($result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user