diff --git a/browse_foreigners.php b/browse_foreigners.php index 74e4e993acb7..dd9979bc69a1 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -223,22 +223,23 @@ function formupdate(fieldmd5, key) { $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)) { diff --git a/db_search.php b/db_search.php index 041242f22299..68cb46302ada 100644 --- a/db_search.php +++ b/db_search.php @@ -314,8 +314,8 @@ function PMA_getSearchSqls($table, $field, $search_str, $search_option) } // end while echo ' ' . "\n"; -$alter_select = - ' 1))) . '#db_search"' . ' onclick="setSelectOptions(\'db_search\', \'table_select[]\', true); return false;">' . __('Select All') . '' . ' / ' . ' diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 2d4b97840d0f..8364a65677fb 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -958,8 +958,8 @@ function checkPmaAbsoluteUri() 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; } diff --git a/libraries/RecentTable.class.php b/libraries/RecentTable.class.php index 1e858995a524..6642acb835ad 100644 --- a/libraries/RecentTable.class.php +++ b/libraries/RecentTable.class.php @@ -76,9 +76,9 @@ public static function getInstance() 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 @@ public function getFromDb() /** * 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 @@ public function getHtmlSelect() $html .= ''; - + return $html; } diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php index 4f98a4a60fee..b325935114df 100644 --- a/libraries/StorageEngine.class.php +++ b/libraries/StorageEngine.class.php @@ -274,8 +274,8 @@ function __construct($engine) 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']) { diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 16ccfc3905ac..a2db8b20752a 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -1391,8 +1391,8 @@ protected function saveUiPrefsToDb() $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']); diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index c356b903fce1..a142249ccda2 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -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++; } diff --git a/libraries/export/latex.php b/libraries/export/latex.php index 1dbe21a9ab97..56523d2cd70a 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -36,50 +36,50 @@ ); /* 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 { /** diff --git a/libraries/export/odt.php b/libraries/export/odt.php index 94a01fc1230c..35e633970f62 100644 --- a/libraries/export/odt.php +++ b/libraries/export/odt.php @@ -28,38 +28,38 @@ ); /* 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'] = ''; diff --git a/libraries/gis/pma_gis_visualization.php b/libraries/gis/pma_gis_visualization.php index f69d6d288fcd..32a5728e74a6 100644 --- a/libraries/gis/pma_gis_visualization.php +++ b/libraries/gis/pma_gis_visualization.php @@ -254,8 +254,8 @@ public function asOl() { $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",' diff --git a/libraries/import/csv.php b/libraries/import/csv.php index 9d0e2aaa000e..8d455f4219a1 100644 --- a/libraries/import/csv.php +++ b/libraries/import/csv.php @@ -34,12 +34,12 @@ ); 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 (if this is unchecked, the first line will become part of the data)')); + $plugin_list['csv']['options'][] + = array('type' => 'bool', 'name' => 'col_names', 'text' => __('The first line of the file contains the table column names (if this is unchecked, the first line will become part of the data)')); } 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'); diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index 83d7d77a1cea..5af1bf7d50fc 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -47,8 +47,8 @@ } //$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]; diff --git a/libraries/pmd_common.php b/libraries/pmd_common.php index 0a09d2868783..d5f13e2e842b 100644 --- a/libraries/pmd_common.php +++ b/libraries/pmd_common.php @@ -15,8 +15,8 @@ $cfgRelation = PMA_getRelationsParam(); -$GLOBALS['script_display_field'] = - '