From 466a7645c77b6c19a526db662440cb7a6df58b56 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Fri, 12 Apr 2013 21:45:02 +0530 Subject: [PATCH 1/5] PHP keywords must be lowercase --- import.php | 4 ++-- libraries/DisplayResults.class.php | 10 +++++----- libraries/Theme.class.php | 2 +- libraries/mult_submits.inc.php | 8 ++++---- libraries/mysql_charsets.lib.php | 2 +- libraries/operations.lib.php | 10 +++++----- libraries/plugins/export/ExportSql.class.php | 4 ++-- libraries/schema/Eps_Relation_Schema.class.php | 2 +- libraries/schema/Svg_Relation_Schema.class.php | 2 +- tbl_relation.php | 2 +- transformation_wrapper.php | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/import.php b/import.php index 2a4f4e15e7..78f238730c 100644 --- a/import.php +++ b/import.php @@ -77,7 +77,7 @@ if (! empty($sql_query)) { $ajax_reload['table_name'] = PMA_Util::unQuote($rename_table_names[2]); $ajax_reload['reload'] = true; } - + $sql_query = ''; } elseif (! empty($sql_localfile)) { // run SQL file on server @@ -565,7 +565,7 @@ if (strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { // There was an error? if (isset($my_die)) { - foreach ($my_die AS $key => $die) { + foreach ($my_die as $key => $die) { PMA_Util::mysqlDie( $die['error'], $die['sql'], '', $err_url, $error ); diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 073df10a46..ab2f8206d0 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2656,7 +2656,7 @@ class PMA_DisplayResults /** - * Get the values for one data row + * Get the values for one data row * * @param integer &$dt_result the link id associated to the query * which results have to be displayed @@ -2696,8 +2696,8 @@ class PMA_DisplayResults $row_info = $this->_getRowInfoForSpecialLinks($row, $col_order); - for ($currentColumn = 0; - $currentColumn < $this->__get('fields_cnt'); + for ($currentColumn = 0; + $currentColumn < $this->__get('fields_cnt'); ++$currentColumn) { // assign $i with appropriate column order @@ -3462,7 +3462,7 @@ class PMA_DisplayResults /** - * Get the combined classes for a column + * Get the combined classes for a column * * @param string $grid_edit_class the class for all editable columns * @param string $not_null_class the class for not null columns @@ -4036,7 +4036,7 @@ class PMA_DisplayResults list($col_order, $col_visib) = $this->_getColumnParams($analyzed_sql); // Prepares data - foreach ($vertical_display['desc'] AS $j => $val) { + foreach ($vertical_display['desc'] as $j => $val) { // assign appropriate key with current column order $key = $col_order ? $col_order[$j] : $j; diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php index bf1ee8f6f8..9f2f640e6e 100644 --- a/libraries/Theme.class.php +++ b/libraries/Theme.class.php @@ -374,7 +374,7 @@ class PMA_Theme global $cfg; $css_string = ''; - foreach ($cfg['SQP']['fmtColor'] AS $key => $col) { + foreach ($cfg['SQP']['fmtColor'] as $key => $col) { $css_string .= $this->buildSQPCssRule('syntax_' . $key, 'color', $col); } diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 181bfc1aa3..24368d945a 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -127,7 +127,7 @@ if (! empty($submit_mult) case 'change': PMA_displayHtmlForColumnChange($db, $table, $selected, $action); // execution stops here but PMA_Response correctly finishes - // the rendering + // the rendering exit; case 'browse': // this should already be handled by tbl_structure.php @@ -165,7 +165,7 @@ if (!empty($submit_mult) && !empty($what)) { } $selected_cnt = count($selected); $i = 0; - foreach ($selected AS $idx => $sval) { + foreach ($selected as $idx => $sval) { switch ($what) { case 'row_delete': $full_query .= 'DELETE FROM ' . PMA_Util::backquote($db) . '.' . PMA_Util::backquote($table) @@ -503,7 +503,7 @@ if (!empty($submit_mult) && !empty($what)) { PMA_DBI_select_db($db); } $result = PMA_DBI_query($a_query); - + if ($query_type == 'drop_db') { PMA_clearTransformations($selected[$i]); } elseif ($query_type == 'drop_tbl') { @@ -511,7 +511,7 @@ if (!empty($submit_mult) && !empty($what)) { } else if ($query_type == 'drop_fld') { PMA_clearTransformations($db, $table, $selected[$i]); } - + } // end if } // end for diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index 45c48afe34..d0a73cec4d 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -80,7 +80,7 @@ if (! PMA_Util::cacheExists('mysql_charsets', true)) { } sort($mysql_collations_flat, SORT_STRING); - foreach ($mysql_collations AS $key => $value) { + foreach ($mysql_collations as $key => $value) { sort($mysql_collations[$key], SORT_STRING); reset($mysql_collations[$key]); } diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index 5c45607488..7a15495402 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -1361,11 +1361,11 @@ function PMA_getHtmlForReferentialIntegrityCheck($foreign, $url_params) $html_output .= '