diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2012-04-22 19:58:41 +0400 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2012-04-22 19:58:41 +0400 |
commit | 4b8d52d937d396301c17472874cb645e92258df3 (patch) | |
tree | fcde2fe963c87d5e8059029212583cac220f41d1 | |
parent | 67134da3d01ff2f2469d79223d0d22a4515d3227 (diff) |
Fix CheckStyle warnings, Type:CloseBracketNewLine (Closing parenthesis of a multi-line IF statement must be on a new line)
37 files changed, 255 insertions, 156 deletions
diff --git a/db_operations.php b/db_operations.php index f7afc484de..ec399fc325 100644 --- a/db_operations.php +++ b/db_operations.php @@ -457,8 +457,9 @@ if ($db != 'mysql') { // Don't even try to drop information_schema. You won't be able to. Believe me. You won't. // Don't allow to easily drop mysql database, RFE #1327514. if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) - && ! $db_is_information_schema - && (PMA_DRIZZLE || $db != 'mysql')) { + && ! $db_is_information_schema + && (PMA_DRIZZLE || $db != 'mysql') +) { ?> <div class="operations_half_width"> <fieldset class="caution"> diff --git a/db_qbe.php b/db_qbe.php index 3ae8b071db..4a5d100adb 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -254,7 +254,8 @@ for ($x = 0; $x < $col; $x++) { // then sorting is not available // Fix for Bug #570698 if (isset($Sort[$x]) && isset($Field[$x]) - && substr($Field[$x], -2) == '.*') { + && substr($Field[$x], -2) == '.*' + ) { $Sort[$x] = ''; } //end if diff --git a/libraries/Config.class.php b/libraries/Config.class.php index eaeb25b43c..e097e4cf52 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -366,7 +366,8 @@ class PMA_Config // find out if there is a .git folder $git_folder = '.git'; if (! @file_exists($git_folder) - || ! @file_exists($git_folder . '/config')) { + || ! @file_exists($git_folder . '/config') + ) { $_SESSION['is_git_revision'] = false; return false; } @@ -384,7 +385,8 @@ class PMA_Config // find out if there is a .git folder $git_folder = '.git'; if (! @file_exists($git_folder) - || ! @file_exists($git_folder . '/config')) { + || ! @file_exists($git_folder . '/config') + ) { return; } diff --git a/libraries/Theme_Manager.class.php b/libraries/Theme_Manager.class.php index f1a0136a8d..638512f631 100644 --- a/libraries/Theme_Manager.class.php +++ b/libraries/Theme_Manager.class.php @@ -122,7 +122,8 @@ class PMA_Theme_Manager // check if user have a theme cookie if (! $this->getThemeCookie() - || ! $this->setActiveTheme($this->getThemeCookie())) { + || ! $this->setActiveTheme($this->getThemeCookie()) + ) { // otherwise use default theme if ($GLOBALS['cfg']['ThemeDefault']) { $this->setActiveTheme($GLOBALS['cfg']['ThemeDefault']); @@ -136,7 +137,8 @@ class PMA_Theme_Manager function checkConfig() { if ($this->_themes_path != trim($GLOBALS['cfg']['ThemePath']) - || $this->theme_default != $GLOBALS['cfg']['ThemeDefault']) { + || $this->theme_default != $GLOBALS['cfg']['ThemeDefault'] + ) { $this->init(); } else { // at least the theme path needs to be checked every time for new diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 0191b332bd..5de6562b66 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -128,7 +128,8 @@ function PMA_auth() /* Perform logout to custom URL */ if (! empty($_REQUEST['old_usr']) - && ! empty($GLOBALS['cfg']['Server']['LogoutURL'])) { + && ! empty($GLOBALS['cfg']['Server']['LogoutURL']) + ) { PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']); exit; } @@ -414,7 +415,8 @@ function PMA_auth_check() // servername if ($GLOBALS['cfg']['AllowArbitraryServer'] - && ! empty($_COOKIE['pmaServer-' . $GLOBALS['server']])) { + && ! empty($_COOKIE['pmaServer-' . $GLOBALS['server']]) + ) { $GLOBALS['pma_auth_server'] = $_COOKIE['pmaServer-' . $GLOBALS['server']]; } @@ -481,11 +483,12 @@ function PMA_auth_set_user() if ($cfg['Server']['user'] != $GLOBALS['PHP_AUTH_USER']) { foreach ($cfg['Servers'] as $idx => $current) { if ($current['host'] == $cfg['Server']['host'] - && $current['port'] == $cfg['Server']['port'] - && $current['socket'] == $cfg['Server']['socket'] - && $current['ssl'] == $cfg['Server']['ssl'] - && $current['connect_type'] == $cfg['Server']['connect_type'] - && $current['user'] == $GLOBALS['PHP_AUTH_USER']) { + && $current['port'] == $cfg['Server']['port'] + && $current['socket'] == $cfg['Server']['socket'] + && $current['ssl'] == $cfg['Server']['ssl'] + && $current['connect_type'] == $cfg['Server']['connect_type'] + && $current['user'] == $GLOBALS['PHP_AUTH_USER'] + ) { $GLOBALS['server'] = $idx; $cfg['Server'] = $current; break; @@ -494,7 +497,8 @@ function PMA_auth_set_user() } // end if if ($GLOBALS['cfg']['AllowArbitraryServer'] - && ! empty($GLOBALS['pma_auth_server'])) { + && ! empty($GLOBALS['pma_auth_server']) + ) { /* Allow to specify 'host port' */ $parts = explode(' ', $GLOBALS['pma_auth_server']); if (count($parts) == 2) { diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index 016ec7d7b6..7827a94d9d 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -158,7 +158,8 @@ function PMA_auth_check() // User logged out -> ensure the new username is not the same if (!empty($old_usr) - && (isset($PHP_AUTH_USER) && $old_usr == $PHP_AUTH_USER)) { + && (isset($PHP_AUTH_USER) && $old_usr == $PHP_AUTH_USER) + ) { $PHP_AUTH_USER = ''; // -> delete user's choices that were stored in session session_destroy(); @@ -197,7 +198,9 @@ function PMA_auth_set_user() $servers_cnt = count($cfg['Servers']); for ($i = 1; $i <= $servers_cnt; $i++) { if (isset($cfg['Servers'][$i]) - && ($cfg['Servers'][$i]['host'] == $cfg['Server']['host'] && $cfg['Servers'][$i]['user'] == $PHP_AUTH_USER)) { + && ($cfg['Servers'][$i]['host'] == $cfg['Server']['host'] + && $cfg['Servers'][$i]['user'] == $PHP_AUTH_USER) + ) { $server = $i; $cfg['Server'] = $cfg['Servers'][$i]; break; diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 10f7634c12..5160ff6c26 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -819,7 +819,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { if (isset($GLOBALS['collation_connection'])) { $GLOBALS['PMA_Config']->setCookie( 'pma_collation_connection', - $GLOBALS['collation_connection']); + $GLOBALS['collation_connection'] + ); } $_SESSION['PMA_Theme_Manager']->setThemeCookie(); diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 0190521fd2..cc3ea5564a 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -3026,10 +3026,9 @@ function PMA_extractColumnSpec($columnspec) } $can_contain_collation = false; - if ( - ! $binary - && - preg_match("@^(char|varchar|text|tinytext|mediumtext|longtext|set|enum)@", $type)) { + if (! $binary + && preg_match("@^(char|varchar|text|tinytext|mediumtext|longtext|set|enum)@", $type) + ) { $can_contain_collation = true; } diff --git a/libraries/config/ConfigFile.class.php b/libraries/config/ConfigFile.class.php index e88ab2a831..3e3fa24256 100644 --- a/libraries/config/ConfigFile.class.php +++ b/libraries/config/ConfigFile.class.php @@ -221,9 +221,10 @@ class ConfigFile $this->orgCfgObject->settings ); if (($value === $default_value && (defined('PMA_SETUP') - || $instance_default_value === $default_value)) - || (empty($value) && empty($default_value) && (defined('PMA_SETUP') - || empty($current_global)))) { + || $instance_default_value === $default_value)) + || (empty($value) && empty($default_value) && (defined('PMA_SETUP') + || empty($current_global))) + ) { PMA_array_remove($path, $_SESSION[$this->id]); return; } @@ -452,7 +453,8 @@ class ConfigFile unset($_SESSION[$this->id]['Servers'][$last_server]); if (isset($_SESSION[$this->id]['ServerDefault']) - && $_SESSION[$this->id]['ServerDefault'] >= 0) { + && $_SESSION[$this->id]['ServerDefault'] >= 0 + ) { unset($_SESSION[$this->id]['ServerDefault']); } } diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index 1bdab38501..d83fcd2dbd 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -449,7 +449,8 @@ class FormDisplay // equality comparison only if both values are numeric or not numeric // (allows to skip 0 == 'string' equalling to true) or identity (for string-string) if (($vk == $value && !(is_numeric($value_cmp) xor is_numeric($vk))) - || $vk === $value) { + || $vk === $value + ) { // keep boolean value as boolean if (!is_bool($value)) { settype($value, gettype($vk)); @@ -521,7 +522,8 @@ class FormDisplay // user preferences allow/disallow if ($is_setup_script && isset($this->userprefs_keys[$system_path])) { if (isset($this->userprefs_disallow[$system_path]) - && isset($_POST[$key . '-userprefs-allow'])) { + && isset($_POST[$key . '-userprefs-allow']) + ) { unset($this->userprefs_disallow[$system_path]); } else if (!isset($_POST[$key . '-userprefs-allow'])) { $this->userprefs_disallow[$system_path] = true; @@ -760,7 +762,8 @@ class FormDisplay } if (!defined('PMA_SETUP')) { if (($system_path == 'MaxDbList' || $system_path == 'MaxTableList' - || $system_path == 'QueryHistoryMax')) { + || $system_path == 'QueryHistoryMax') + ) { $opts['comment'] = sprintf(__('maximum %s'), $GLOBALS['cfg'][$system_path]); } } diff --git a/libraries/config/validate.lib.php b/libraries/config/validate.lib.php index 4d7f92dca6..0373bf9369 100644 --- a/libraries/config/validate.lib.php +++ b/libraries/config/validate.lib.php @@ -382,7 +382,8 @@ function validate_trusted_proxies($path, $values) } // now let's check whether we really have an IP address if (filter_var($matches[1], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === false - && filter_var($matches[1], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false) { + && filter_var($matches[1], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false + ) { $ip = htmlspecialchars(trim($matches[1])); $result[$path][] = sprintf(__('Incorrect IP address: %s'), $ip); continue; diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index d111cfd200..d4b945310b 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -236,7 +236,8 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") { foreach ($cfg['AvailableCharsets'] as $temp_charset) { echo '<option value="' . htmlentities($temp_charset) . '"'; if ((empty($cfg['Import']['charset']) && $temp_charset == 'utf-8') - || $temp_charset == $cfg['Import']['charset']) { + || $temp_charset == $cfg['Import']['charset'] + ) { echo ' selected="selected"'; } echo '>' . htmlentities($temp_charset) . '</option>'; diff --git a/libraries/display_import_ajax.lib.php b/libraries/display_import_ajax.lib.php index 1e9e98a140..8dddc468f7 100644 --- a/libraries/display_import_ajax.lib.php +++ b/libraries/display_import_ajax.lib.php @@ -81,7 +81,8 @@ function PMA_import_sessionCheck() { if (PMA_PHP_INT_VERSION < 50400 || ! ini_get('session.upload_progress.enabled') - || ! function_exists('curl_exec')) { + || ! function_exists('curl_exec') + ) { return false; } return true; diff --git a/libraries/import/csv.php b/libraries/import/csv.php index 79e1cd30d2..fe5cbe5c6e 100644 --- a/libraries/import/csv.php +++ b/libraries/import/csv.php @@ -234,9 +234,11 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) { } $i++; $ch = $buffer[$i]; - if ($csv_enclosed == $csv_escaped && ($ch == $csv_terminated - || $ch == $csv_new_line || ($csv_new_line == 'auto' - && ($ch == "\r" || $ch == "\n")))) { + if ($csv_enclosed == $csv_escaped + && ($ch == $csv_terminated + || $ch == $csv_new_line + || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n"))) + ) { break; } } diff --git a/libraries/import/docsql.php b/libraries/import/docsql.php index cf583aa216..16f8e3ddcd 100644 --- a/libraries/import/docsql.php +++ b/libraries/import/docsql.php @@ -19,7 +19,8 @@ $cfgRelation = PMA_getRelationsParam(); * We need relations enabled and we work only on database */ if ($plugin_param !== 'database' || $GLOBALS['num_tables'] < 1 - || ! $cfgRelation['relwork'] || ! $cfgRelation['commwork']) { + || ! $cfgRelation['relwork'] || ! $cfgRelation['commwork'] +) { return; } diff --git a/libraries/import/sql.php b/libraries/import/sql.php index 3f1ed8efc2..f67988cad1 100644 --- a/libraries/import/sql.php +++ b/libraries/import/sql.php @@ -218,7 +218,8 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) { // Not enough data to decide if ((($i == ($len - 1) && ($ch == '-' || $ch == '/')) || ($i == ($len - 2) && (($ch == '-' && $buffer[$i + 1] == '-') - || ($ch == '/' && $buffer[$i + 1] == '*')))) && !$GLOBALS['finished']) { + || ($ch == '/' && $buffer[$i + 1] == '*')))) && !$GLOBALS['finished'] + ) { break; } @@ -228,7 +229,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) { && (($i < ($len - 2) && $buffer[$i + 2] <= ' ') || ($i == ($len - 1) && $GLOBALS['finished']))) || ($i < ($len - 1) && $ch == '/' && $buffer[$i + 1] == '*') - ) { + ) { // Copy current string to SQL if ($start_pos != $i) { $sql .= substr($buffer, $start_pos, $i - $start_pos); diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 92bb31f97a..7d51dbd2a7 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -318,7 +318,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { if (($c == '#') || (($count2 + 1 < $len) && ($c == '/') && ($next_c == '*')) || (($count2 + 2 == $len) && ($c == '-') && ($next_c == '-')) - || (($count2 + 2 < $len) && ($c == '-') && ($next_c == '-') && ((PMA_substr($sql, $count2 + 2, 1) <= ' ')))) { + || (($count2 + 2 < $len) && ($c == '-') && ($next_c == '-') && ((PMA_substr($sql, $count2 + 2, 1) <= ' '))) + ) { $count2++; $pos = 0; $type = 'bad'; @@ -476,8 +477,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { || $c == '@' || ($c == '.' && PMA_STR_isDigit(PMA_substr($sql, $count2 + 1, 1)) - && ($previous_was_space || $previous_was_bracket || $previous_was_listsep))) { - + && ($previous_was_space || $previous_was_bracket || $previous_was_listsep)) + ) { /* DEBUG echo PMA_substr($sql, $count2); echo '<hr />'; @@ -782,7 +783,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { || ($d_bef_prev_upper == 'SET' && $d_prev_upper == '=') || ($d_bef_prev_upper == 'CHARSET' && $d_prev_upper == '=') || $d_prev_upper == 'CHARSET' - ) && in_array($d_cur, $mysql_charsets)) { + ) && in_array($d_cur, $mysql_charsets) + ) { $t_suffix = '_charset'; } } elseif (in_array($d_cur, $mysql_charsets) @@ -1173,8 +1175,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { || $arr[$i]['type'] == 'quote_single' || $arr[$i]['type'] == 'alpha_identifier' || ($arr[$i]['type'] == 'alpha_reservedWord' - && $arr[$i]['forbidden'] == false)) { - + && $arr[$i]['forbidden'] == false) + ) { switch ($arr[$i]['type']) { case 'alpha_identifier': case 'alpha_reservedWord': @@ -1196,8 +1198,9 @@ if (! defined('PMA_MINIMUM_COMMON')) { } // end switch if ($subresult['querytype'] == 'SELECT' - && ! $in_group_concat - && ! ($seen_subquery && $arr[$i - 1]['type'] == 'punct_bracket_close_round')) { + && ! $in_group_concat + && ! ($seen_subquery && $arr[$i - 1]['type'] == 'punct_bracket_close_round') + ) { if (!$seen_from) { if ($previous_was_identifier && isset($chain)) { // found alias for this select_expr, save it @@ -1250,8 +1253,9 @@ if (! defined('PMA_MINIMUM_COMMON')) { // the "*" is not saved if (isset($chain) && !$seen_end_of_table_ref - && ((!$seen_from && $arr[$i]['type'] == 'punct_listsep') - || ($arr[$i]['type'] == 'alpha_reservedWord' && $upper_data == 'FROM'))) { + && ((!$seen_from && $arr[$i]['type'] == 'punct_listsep') + || ($arr[$i]['type'] == 'alpha_reservedWord' && $upper_data == 'FROM')) + ) { $size_chain = count($chain); $current_select_expr++; $subresult['select_expr'][$current_select_expr] = array( @@ -1295,7 +1299,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { * @todo explain this: */ if (($arr[$i]['type'] == 'alpha_reservedWord') - && ($upper_data != 'FROM')) { + && ($upper_data != 'FROM') + ) { $previous_was_identifier = true; } @@ -1318,7 +1323,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { && ($arr[$i]['type'] == 'punct_listsep' || ($arr[$i]['type'] == 'alpha_reservedWord' && $upper_data!="AS") || $seen_end_of_table_ref - || $i==$size-1)) { + || $i==$size-1) + ) { $size_chain = count($chain); $current_table_ref++; @@ -1382,25 +1388,29 @@ if (! defined('PMA_MINIMUM_COMMON')) { // set the $previous_was_identifier to false if the current // token is not an identifier if (($arr[$i]['type'] != 'alpha_identifier') - && ($arr[$i]['type'] != 'quote_double') - && ($arr[$i]['type'] != 'quote_single') - && ($arr[$i]['type'] != 'quote_backtick')) { + && ($arr[$i]['type'] != 'quote_double') + && ($arr[$i]['type'] != 'quote_single') + && ($arr[$i]['type'] != 'quote_backtick') + ) { $previous_was_identifier = false; } // end if // however, if we are on AS, we must keep the $previous_was_identifier if (($arr[$i]['type'] == 'alpha_reservedWord') - && ($upper_data == 'AS')) { + && ($upper_data == 'AS') + ) { $previous_was_identifier = true; } if (($arr[$i]['type'] == 'alpha_reservedWord') - && ($upper_data =='ON' || $upper_data =='USING')) { + && ($upper_data =='ON' || $upper_data =='USING') + ) { $save_table_ref = false; } // end if (data == ON) if (($arr[$i]['type'] == 'alpha_reservedWord') - && ($upper_data =='JOIN' || $upper_data =='FROM')) { + && ($upper_data =='JOIN' || $upper_data =='FROM') + ) { $save_table_ref = true; } // end if (data == JOIN) @@ -1420,9 +1430,10 @@ if (! defined('PMA_MINIMUM_COMMON')) { // but it's a modifier of the GROUP_CONCAT so // it's not the real end of table refs if (($i == $size-1) - || ($arr[$i]['type'] == 'alpha_reservedWord' - && !$in_group_concat - && isset($words_ending_table_ref[$upper_data]))) { + || ($arr[$i]['type'] == 'alpha_reservedWord' + && !$in_group_concat + && isset($words_ending_table_ref[$upper_data])) + ) { $seen_end_of_table_ref = true; // to be able to save the last table ref, but do not // set it true if we found a word like "ON" that has @@ -1538,8 +1549,9 @@ if (! defined('PMA_MINIMUM_COMMON')) { // if the first reserved word is DROP or DELETE, // we know this is a query that needs to be confirmed if ($first_reserved_word=='DROP' - || $first_reserved_word == 'DELETE' - || $first_reserved_word == 'TRUNCATE') { + || $first_reserved_word == 'DELETE' + || $first_reserved_word == 'TRUNCATE' + ) { $subresult['queryflags']['need_confirm'] = 1; } @@ -1741,21 +1753,24 @@ if (! defined('PMA_MINIMUM_COMMON')) { $where_clause .= $arr[$i]['data'] . $sep; if (($arr[$i]['type'] == 'quote_backtick') - || ($arr[$i]['type'] == 'alpha_identifier')) { + || ($arr[$i]['type'] == 'alpha_identifier') + ) { $where_clause_identifiers[] = $arr[$i]['data']; } } // to grab the rest of the query after the ORDER BY clause if (isset($subresult['queryflags']['select_from']) - && $subresult['queryflags']['select_from'] == 1 - && ! $in_order_by - && $seen_order_by - && $upper_data != 'BY') { + && $subresult['queryflags']['select_from'] == 1 + && ! $in_order_by + && $seen_order_by + && $upper_data != 'BY' + ) { $unsorted_query .= $arr[$i]['data']; if ($arr[$i]['type'] != 'punct_bracket_open_round' - && $arr[$i]['type'] != 'punct_bracket_close_round' - && $arr[$i]['type'] != 'punct') { + && $arr[$i]['type'] != 'punct_bracket_close_round' + && $arr[$i]['type'] != 'punct' + ) { $unsorted_query .= $sep; } } @@ -1875,7 +1890,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { $clause = 'on_update'; } if (isset($clause) - && ($arr[$i+2]['type'] == 'alpha_reservedWord' + && ($arr[$i+2]['type'] == 'alpha_reservedWord' // ugly workaround because currently, NO is not // in the list of reserved words in sqlparser.data @@ -1886,16 +1901,19 @@ if (! defined('PMA_MINIMUM_COMMON')) { ) { $third_upper_data = strtoupper($arr[$i+2]['data']); if ($third_upper_data == 'CASCADE' - || $third_upper_data == 'RESTRICT') { + || $third_upper_data == 'RESTRICT' + ) { $value = $third_upper_data; } elseif ($third_upper_data == 'SET' - || $third_upper_data == 'NO') { + || $third_upper_data == 'NO' + ) { if ($arr[$i+3]['type'] == 'alpha_reservedWord') { $value = $third_upper_data . '_' . strtoupper($arr[$i+3]['data']); } } elseif ($third_upper_data == 'CURRENT_TIMESTAMP') { if ($clause == 'on_update' - && $in_timestamp_options) { + && $in_timestamp_options + ) { $create_table_fields[$current_identifier]['on_update_current_timestamp'] = true; $seen_default = false; } @@ -2288,8 +2306,9 @@ if (! defined('PMA_MINIMUM_COMMON')) { break; case 'punct': $before .= ' '; - if ($docu && isset($PMA_SQPdata_operators_docs[$arr[$i]['data']]) && - ($arr[$i]['data'] != '*' || in_array($arr[$i]['type'], array('digit_integer','digit_float','digit_hex')))) { + if ($docu && isset($PMA_SQPdata_operators_docs[$arr[$i]['data']]) + && ($arr[$i]['data'] != '*' || in_array($arr[$i]['type'], array('digit_integer','digit_float','digit_hex'))) + ) { $before .= PMA_showMySQLDocu( 'functions', $PMA_SQPdata_operators_docs[$arr[$i]['data']]['link'], @@ -2399,7 +2418,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { // binary is marked as alpha_columnAttrib // but should be marked as a reserved word if (strtoupper($arr[$i]['data']) == 'BINARY' - && $typearr[3] == 'alpha_identifier') { + && $typearr[3] == 'alpha_identifier' + ) { $after .= ' '; } break; @@ -2431,7 +2451,8 @@ if (! defined('PMA_MINIMUM_COMMON')) { || (($typearr[1] == 'alpha_reservedWord') && isset($keywords_no_newline[strtoupper($arr[$i - 1]['data'])]))) && ($typearr[1] != 'punct_level_plus') - && (!isset($keywords_no_newline[$arr[$i]['data']]))) { + && (!isset($keywords_no_newline[$arr[$i]['data']])) + ) { // do not put a space before the first token, because // we use a lot of pattern matching checking for the // first reserved word at beginning of query diff --git a/libraries/sqlvalidator.lib.php b/libraries/sqlvalidator.lib.php index 27e1dfbec7..a8233a0f89 100644 --- a/libraries/sqlvalidator.lib.php +++ b/libraries/sqlvalidator.lib.php @@ -63,7 +63,8 @@ function PMA_validateSQL($sql) if ($cfg['SQLValidator']['use']) { if (isset($GLOBALS['sqlvalidator_error']) - && $GLOBALS['sqlvalidator_error']) { + && $GLOBALS['sqlvalidator_error'] + ) { $str = sprintf(__('The SQL validator could not be initialized. Please check if you have installed the necessary PHP extensions as described in the %sdocumentation%s.'), '<a href="Documentation.html#faqsqlvalidator" target="documentation">', '</a>'); } else { // create new class instance diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php index fd9bda5efe..64ab515136 100644 --- a/libraries/tbl_properties.inc.php +++ b/libraries/tbl_properties.inc.php @@ -354,8 +354,9 @@ for ($i = 0; $i < $num_fields; $i++) { // for a TIMESTAMP, do not show the string "CURRENT_TIMESTAMP" as a default value if ($type_upper == 'TIMESTAMP' - && ! empty($default_current_timestamp) - && isset($row['Default'])) { + && ! empty($default_current_timestamp) + && isset($row['Default']) + ) { $row['Default'] = ''; } @@ -411,22 +412,25 @@ for ($i = 0; $i < $num_fields; $i++) { // NULL attribute, but SHOW CREATE TABLE says the contrary. Believe // the latter. if (PMA_MYSQL_INT_VERSION < 50025 - && isset($row['Field']) - && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['type']) - && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' - && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null'] == true) { + && isset($row['Field']) + && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['type']) + && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' + && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null'] == true + ) { $row['Null'] = ''; } // MySQL 4.1.2+ TIMESTAMP options // (if on_update_current_timestamp is set, then it's TRUE) if (isset($row['Field']) - && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['on_update_current_timestamp'])) { + && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['on_update_current_timestamp']) + ) { $attribute = 'on update CURRENT_TIMESTAMP'; } if ((isset($row['Field']) - && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['default_current_timestamp'])) - || (isset($submit_default_current_timestamp) && $submit_default_current_timestamp)) { + && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['default_current_timestamp'])) + || (isset($submit_default_current_timestamp) && $submit_default_current_timestamp) + ) { $default_current_timestamp = true; } else { $default_current_timestamp = false; @@ -56,7 +56,7 @@ if ($server > 0) { $server_info .= PMA_DBI_get_host_info(); } if (! empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) { - $server_info .= ')'; + $server_info .= ')'; } $mysql_cur_user_and_host = PMA_DBI_fetch_value('SELECT USER();'); @@ -69,7 +69,8 @@ if ($server > 0) { echo '<div id="maincontainer">' . "\n"; echo '<div id="main_pane_left">'; if ($server > 0 - || (! $cfg['LeftDisplayServers'] && count($cfg['Servers']) > 1)) { + || (! $cfg['LeftDisplayServers'] && count($cfg['Servers']) > 1) +) { echo '<div class="group">'; echo '<h2>' . __('General Settings') . '</h2>'; echo '<ul>'; @@ -78,7 +79,8 @@ if ($server > 0 * Displays the MySQL servers choice form */ if (! $cfg['LeftDisplayServers'] - && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) { + && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1) + ) { echo '<li id="li_select_server">'; include_once 'libraries/select_server.lib.php'; PMA_select_server(true, true); @@ -219,7 +221,7 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) { ); PMA_printListItem( __('PHP extension') . ': ' . $GLOBALS['cfg']['Server']['extension']. ' ' - . PMA_showPHPDocu('book.' . $GLOBALS['cfg']['Server']['extension'] . '.php'), + . PMA_showPHPDocu('book.' . $GLOBALS['cfg']['Server']['extension'] . '.php'), 'li_used_php_extension' ); } @@ -271,8 +273,9 @@ PMA_printListItem(__('List of changes'), 'li_pma_changes', PMA_linkURL('changelo * Warning if using the default MySQL privileged account */ if ($server != 0 - && $cfg['Server']['user'] == 'root' - && $cfg['Server']['password'] == '') { + && $cfg['Server']['user'] == 'root' + && $cfg['Server']['password'] == '' +) { trigger_error(__('Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user \'root\'.'), E_USER_WARNING); } @@ -310,8 +313,9 @@ if ($GLOBALS['cfg']['LoginCookieStore'] != 0 && $GLOBALS['cfg']['LoginCookieStor /** * Check if user does not have defined blowfish secret and it is being used. */ -if (!empty($_SESSION['auto_blowfish_secret']) && - empty($GLOBALS['cfg']['blowfish_secret'])) { +if (! empty($_SESSION['auto_blowfish_secret']) + && empty($GLOBALS['cfg']['blowfish_secret']) +) { trigger_error(__('The configuration file now needs a secret passphrase (blowfish_secret).'), E_USER_WARNING); } diff --git a/navigation.php b/navigation.php index 91442afd5a..e8c7a61404 100644 --- a/navigation.php +++ b/navigation.php @@ -239,7 +239,8 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { $db_tooltip = ''; if ($GLOBALS['cfg']['ShowTooltip'] - && $GLOBALS['cfgRelation']['commwork']) { + && $GLOBALS['cfgRelation']['commwork'] + ) { $_db_tooltip = PMA_getDbComment($GLOBALS['db']); if ($_db_tooltip) { $db_tooltip = $_db_tooltip; @@ -348,7 +349,9 @@ function PMA_displayDbList($ext_dblist, $offset, $count) $element_counter++; echo '<li class="dbgroup">'; if ((! empty($_REQUEST['dbgroup']) && $_REQUEST['dbgroup'] == $group) - || $db_start == $group || strpos($db_start, $group) === 0) { + || $db_start == $group + || strpos($db_start, $group) === 0 + ) { // display + only if this db(group) is not preselected printf($href_left, $element_counter, PMA_generate_common_url()); printf($img_minus, $element_counter); @@ -358,7 +361,9 @@ function PMA_displayDbList($ext_dblist, $offset, $count) } echo '</a> ' . $group . "\n"; if ((! empty($_REQUEST['dbgroup']) && $_REQUEST['dbgroup'] == $group) - || $db_start == $group || strpos($db_start, $group) === 0) { + || $db_start == $group + || strpos($db_start, $group) === 0 + ) { echo '<ul id="subel' . $element_counter . '">' . "\n"; } else { echo '<ul id="subel' . $element_counter . '"' diff --git a/phpmyadmin.css.php b/phpmyadmin.css.php index 7aa8aec9d7..52268a4e8d 100644 --- a/phpmyadmin.css.php +++ b/phpmyadmin.css.php @@ -18,7 +18,8 @@ require_once 'libraries/sqlparser.lib.php'; // MSIE 6 (at least some unpatched versions) has problems loading CSS // when zlib_compression is on if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER == '6' - && (ini_get('zlib.output_compression'))) { + && (ini_get('zlib.output_compression')) +) { @ini_set('zlib.output_compression', 'Off'); } diff --git a/pmd_general.php b/pmd_general.php index 10bba34f27..e637275cf9 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -303,16 +303,19 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { ?> <img src="<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>pmd/Field_small<?php if (strstr($tab_column[$t_n]["TYPE"][$j], 'char') - || strstr($tab_column[$t_n]["TYPE"][$j], 'text')) { + || strstr($tab_column[$t_n]["TYPE"][$j], 'text') + ) { echo '_char'; } elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'int') - || strstr($tab_column[$t_n]["TYPE"][$j], 'float') - || strstr($tab_column[$t_n]["TYPE"][$j], 'double') - || strstr($tab_column[$t_n]["TYPE"][$j], 'decimal')) { + || strstr($tab_column[$t_n]["TYPE"][$j], 'float') + || strstr($tab_column[$t_n]["TYPE"][$j], 'double') + || strstr($tab_column[$t_n]["TYPE"][$j], 'decimal') + ) { echo '_int'; } elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'date') - || strstr($tab_column[$t_n]["TYPE"][$j], 'time') - || strstr($tab_column[$t_n]["TYPE"][$j], 'year')) { + || strstr($tab_column[$t_n]["TYPE"][$j], 'time') + || strstr($tab_column[$t_n]["TYPE"][$j], 'year') + ) { echo '_date'; } ?>.png" alt="*" /> diff --git a/pmd_relation_new.php b/pmd_relation_new.php index 37c9c47a9a..852cf05779 100644 --- a/pmd_relation_new.php +++ b/pmd_relation_new.php @@ -24,7 +24,8 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && // relation exists? $existrel_foreign = PMA_getForeigners($db, $T2, '', 'foreign'); if (isset($existrel_foreign[$F2]) - && isset($existrel_foreign[$F2]['constraint'])) { + && isset($existrel_foreign[$F2]['constraint']) + ) { PMD_return_new(0, __('Error: relation already exists.')); } // note: in InnoDB, the index does not requires to be on a PRIMARY diff --git a/prefs_manage.php b/prefs_manage.php index 89e468507f..6e4f9d01f4 100644 --- a/prefs_manage.php +++ b/prefs_manage.php @@ -139,24 +139,28 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') == // check for ThemeDefault and fontsize $params = array(); if (isset($config['ThemeDefault']) - && $_SESSION['PMA_Theme_Manager']->theme->getId() != $config['ThemeDefault'] - && $_SESSION['PMA_Theme_Manager']->checkTheme($config['ThemeDefault'])) { + && $_SESSION['PMA_Theme_Manager']->theme->getId() != $config['ThemeDefault'] + && $_SESSION['PMA_Theme_Manager']->checkTheme($config['ThemeDefault']) + ) { $_SESSION['PMA_Theme_Manager']->setActiveTheme($config['ThemeDefault']); $_SESSION['PMA_Theme_Manager']->setThemeCookie(); $params['reload_left_frame'] = true; } if (isset($config['fontsize']) - && $config['fontsize'] != $GLOBALS['PMA_Config']->get('fontsize')) { + && $config['fontsize'] != $GLOBALS['PMA_Config']->get('fontsize') + ) { $params['set_fontsize'] = $config['fontsize']; $params['reload_left_frame'] = true; } if (isset($config['lang']) - && $config['lang'] != $GLOBALS['lang']) { + && $config['lang'] != $GLOBALS['lang'] + ) { $params['lang'] = $config['lang']; $params['reload_left_frame'] = true; } if (isset($config['collation_connection']) - && $config['collation_connection'] != $GLOBALS['collation_connection']) { + && $config['collation_connection'] != $GLOBALS['collation_connection'] + ) { $params['collation_connection'] = $config['collation_connection']; $params['reload_left_frame'] = true; } diff --git a/querywindow.php b/querywindow.php index fc8afea804..2f8a0dc178 100644 --- a/querywindow.php +++ b/querywindow.php @@ -43,7 +43,8 @@ $querydisplay_tabs = array( ); if (isset($_REQUEST['querydisplay_tab']) - && in_array($_REQUEST['querydisplay_tab'], $querydisplay_tabs)) { + && in_array($_REQUEST['querydisplay_tab'], $querydisplay_tabs) +) { $querydisplay_tab = $_REQUEST['querydisplay_tab']; } else { $querydisplay_tab = $GLOBALS['cfg']['QueryWindowDefTab']; @@ -169,7 +170,8 @@ PMA_sqlQueryForm($query_to_display, $querydisplay_tab); $_sql_history = PMA_getHistory($GLOBALS['cfg']['Server']['user']); if (! empty($_sql_history) - && ($querydisplay_tab == 'history' || $querydisplay_tab == 'full')) { + && ($querydisplay_tab == 'history' || $querydisplay_tab == 'full') +) { $tab = $querydisplay_tab != 'full' ? 'sql' : 'full'; echo __('SQL history') . ':<br />' . '<ul>'; diff --git a/schema_edit.php b/schema_edit.php index fe1349285d..6fcfacb784 100644 --- a/schema_edit.php +++ b/schema_edit.php @@ -59,10 +59,10 @@ if (! isset($cfgRelation['pdf_pages'])) { if ($cfgRelation['pdfwork']) { - /** - * User object created for presenting the HTML options - * so, user can interact with it and perform export of relations schema - */ + /** + * User object created for presenting the HTML options + * so, user can interact with it and perform export of relations schema + */ include_once 'libraries/schema/User_Schema.class.php'; $user_schema = new PMA_User_Schema(); @@ -103,14 +103,15 @@ if ($cfgRelation['pdfwork']) { $user_schema->showTableDashBoard(); if (isset($_REQUEST['do']) - && ($_REQUEST['do'] == 'edcoord' - || ($_REQUEST['do']== 'selectpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0) - || ($_REQUEST['do'] == 'createpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0))) { + && ($_REQUEST['do'] == 'edcoord' + || ($_REQUEST['do']== 'selectpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0) + || ($_REQUEST['do'] == 'createpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0)) + ) { - /** - * show Export schema generation options - */ - $user_schema->displaySchemaGenerationOptions(); + /** + * show Export schema generation options + */ + $user_schema->displaySchemaGenerationOptions(); if ((isset($showwysiwyg) && $showwysiwyg == '1')) { ?> @@ -120,7 +121,7 @@ if ($cfgRelation['pdfwork']) { //]]> </script> <?php - } + } } // end if } // end if ($cfgRelation['pdfwork']) diff --git a/server_databases.php b/server_databases.php index 0b8b3dbd4e..26f479dca5 100644 --- a/server_databases.php +++ b/server_databases.php @@ -91,7 +91,8 @@ if ((isset($_REQUEST['drop_selected_dbs']) || isset($_REQUEST['query_type'])) $submit_mult = 'drop_db'; $err_url = 'server_databases.php?' . PMA_generate_common_url(); if (isset($_REQUEST['selected_dbs']) - && !isset($_REQUEST['is_js_confirmed'])) { + && !isset($_REQUEST['is_js_confirmed']) + ) { $selected_db = $_REQUEST['selected_dbs']; } if (isset($_REQUEST['is_js_confirmed'])) { diff --git a/show_config_errors.php b/show_config_errors.php index 0b295ed031..18dcbabc1b 100644 --- a/show_config_errors.php +++ b/show_config_errors.php @@ -10,7 +10,8 @@ $GLOBALS['now'] = gmdate('D, d M Y H:i:s') . ' GMT'; header('Expires: ' . date(DATE_RFC1123)); // rfc2616 - Section 14.21 header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1 if (isset($_SERVER['HTTP_USER_AGENT']) - && stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { + && stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE') +) { /* FIXME: Why is this special case for IE needed? */ header('Pragma: public'); diff --git a/tbl_addfield.php b/tbl_addfield.php index abc07be67c..b6c38caf75 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -54,7 +54,8 @@ if (isset($_REQUEST['do_save_data'])) { $field_fulltext = array(); for ($i = 0; $i < $field_cnt; ++$i) { if (isset($_REQUEST['field_key'][$i]) - && strlen($_REQUEST['field_name'][$i])) { + && strlen($_REQUEST['field_name'][$i]) + ) { if ($_REQUEST['field_key'][$i] == 'primary_' . $i) { $field_primary[] = $i; } diff --git a/tbl_alter.php b/tbl_alter.php index 9bc3416712..5f50c235d5 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -134,8 +134,9 @@ if (isset($_REQUEST['do_save_data'])) { // update mime types if (isset($_REQUEST['field_mimetype']) - && is_array($_REQUEST['field_mimetype']) - && $cfg['BrowseMIME']) { + && is_array($_REQUEST['field_mimetype']) + && $cfg['BrowseMIME'] + ) { foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) { if (isset($_REQUEST['field_name'][$fieldindex]) && strlen($_REQUEST['field_name'][$fieldindex]) diff --git a/tbl_create.php b/tbl_create.php index 918e11d714..978c83a742 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -210,11 +210,13 @@ if (isset($_REQUEST['do_save_data'])) { // Update comment table for mime types [MIME] if (isset($_REQUEST['field_mimetype']) - && is_array($_REQUEST['field_mimetype']) - && $cfg['BrowseMIME']) { + && is_array($_REQUEST['field_mimetype']) + && $cfg['BrowseMIME'] + ) { foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) { if (isset($_REQUEST['field_name'][$fieldindex]) - && strlen($_REQUEST['field_name'][$fieldindex])) { + && strlen($_REQUEST['field_name'][$fieldindex]) + ) { PMA_setMIME( $db, $table, $_REQUEST['field_name'][$fieldindex], $mimetype, $_REQUEST['field_transformation'][$fieldindex], diff --git a/tbl_export.php b/tbl_export.php index f9722c4fc2..c2f171f6a2 100644 --- a/tbl_export.php +++ b/tbl_export.php @@ -55,7 +55,8 @@ if (! empty($sql_query)) { $wheres = array(); if (isset($where_clause) && is_array($where_clause) - && count($where_clause) > 0) { + && count($where_clause) > 0 + ) { $wheres[] = '(' . implode(') OR (', $where_clause) . ')'; } diff --git a/tbl_operations.php b/tbl_operations.php index b3bb5dac69..5898d76d28 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -97,11 +97,13 @@ if (isset($_REQUEST['submitoptions'])) { } } if (isset($_REQUEST['comment']) - && urldecode($_REQUEST['prev_comment']) !== $_REQUEST['comment']) { + && urldecode($_REQUEST['prev_comment']) !== $_REQUEST['comment'] + ) { $table_alters[] = 'COMMENT = \'' . PMA_sqlAddSlashes($_REQUEST['comment']) . '\''; } if (! empty($_REQUEST['new_tbl_storage_engine']) - && strtolower($_REQUEST['new_tbl_storage_engine']) !== strtolower($tbl_storage_engine)) { + && strtolower($_REQUEST['new_tbl_storage_engine']) !== strtolower($tbl_storage_engine) + ) { $table_alters[] = 'ENGINE = ' . $_REQUEST['new_tbl_storage_engine']; $tbl_storage_engine = $_REQUEST['new_tbl_storage_engine']; // reset the globals for the new engine @@ -113,51 +115,59 @@ if (isset($_REQUEST['submitoptions'])) { } if (! empty($_REQUEST['tbl_collation']) - && $_REQUEST['tbl_collation'] !== $tbl_collation) { + && $_REQUEST['tbl_collation'] !== $tbl_collation + ) { $table_alters[] = 'DEFAULT ' . PMA_generateCharsetQueryPart($_REQUEST['tbl_collation']); } if (($is_myisam_or_aria || $is_isam) - && isset($_REQUEST['new_pack_keys']) - && $_REQUEST['new_pack_keys'] != (string)$pack_keys) { + && isset($_REQUEST['new_pack_keys']) + && $_REQUEST['new_pack_keys'] != (string)$pack_keys + ) { $table_alters[] = 'pack_keys = ' . $_REQUEST['new_pack_keys']; } $checksum = empty($checksum) ? '0' : '1'; $_REQUEST['new_checksum'] = empty($_REQUEST['new_checksum']) ? '0' : '1'; if ($is_myisam_or_aria - && $_REQUEST['new_checksum'] !== $checksum) { + && $_REQUEST['new_checksum'] !== $checksum + ) { $table_alters[] = 'checksum = ' . $_REQUEST['new_checksum']; } $_REQUEST['new_transactional'] = empty($_REQUEST['new_transactional']) ? '0' : '1'; if ($is_aria - && $_REQUEST['new_transactional'] !== $transactional) { + && $_REQUEST['new_transactional'] !== $transactional + ) { $table_alters[] = 'TRANSACTIONAL = ' . $_REQUEST['new_transactional']; } $_REQUEST['new_page_checksum'] = empty($_REQUEST['new_page_checksum']) ? '0' : '1'; if ($is_aria - && $_REQUEST['new_page_checksum'] !== $page_checksum) { + && $_REQUEST['new_page_checksum'] !== $page_checksum + ) { $table_alters[] = 'PAGE_CHECKSUM = ' . $_REQUEST['new_page_checksum']; } $delay_key_write = empty($delay_key_write) ? '0' : '1'; $_REQUEST['new_delay_key_write'] = empty($_REQUEST['new_delay_key_write']) ? '0' : '1'; if ($is_myisam_or_aria - && $_REQUEST['new_delay_key_write'] !== $delay_key_write) { + && $_REQUEST['new_delay_key_write'] !== $delay_key_write + ) { $table_alters[] = 'delay_key_write = ' . $_REQUEST['new_delay_key_write']; } if (($is_myisam_or_aria || $is_innodb || $is_pbxt) - && ! empty($_REQUEST['new_auto_increment']) - && (! isset($auto_increment) || $_REQUEST['new_auto_increment'] !== $auto_increment)) { + && ! empty($_REQUEST['new_auto_increment']) + && (! isset($auto_increment) || $_REQUEST['new_auto_increment'] !== $auto_increment) + ) { $table_alters[] = 'auto_increment = ' . PMA_sqlAddSlashes($_REQUEST['new_auto_increment']); } if (($is_myisam_or_aria || $is_innodb || $is_pbxt) - && ! empty($_REQUEST['new_row_format']) - && (! isset($row_format) || strtolower($_REQUEST['new_row_format']) !== strtolower($row_format))) { + && ! empty($_REQUEST['new_row_format']) + && (! isset($row_format) || strtolower($_REQUEST['new_row_format']) !== strtolower($row_format)) + ) { $table_alters[] = 'ROW_FORMAT = ' . PMA_sqlAddSlashes($_REQUEST['new_row_format']); } @@ -452,7 +462,8 @@ if ($is_aria) { } // end if (ARIA) if (isset($auto_increment) && strlen($auto_increment) > 0 - && ($is_myisam_or_aria || $is_innodb || $is_pbxt)) { + && ($is_myisam_or_aria || $is_innodb || $is_pbxt) +) { ?> <tr><td><label for="auto_increment_opt">AUTO_INCREMENT</label></td> <td><input type="text" name="new_auto_increment" id="auto_increment_opt" @@ -570,7 +581,8 @@ if (isset($possible_row_formats[$tbl_storage_engine])) { <?php } // endif if (isset($_COOKIE['pma_switch_to_new']) - && $_COOKIE['pma_switch_to_new'] == 'true') { + && $_COOKIE['pma_switch_to_new'] == 'true' + ) { $pma_switch_to_new = 'true'; } ?> diff --git a/tbl_row_action.php b/tbl_row_action.php index bd9309bb10..708009a83f 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -16,7 +16,8 @@ require_once 'libraries/mysql_charsets.lib.php'; * No rows were selected => show again the query and tell that user. */ if (! PMA_isValid($_REQUEST['rows_to_delete'], 'array') - && ! isset($_REQUEST['mult_btn'])) { + && ! isset($_REQUEST['mult_btn']) +) { $disp_message = __('No rows selected'); $disp_query = ''; include 'sql.php'; diff --git a/tbl_structure.php b/tbl_structure.php index a0b85df77d..9f1578c889 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -426,7 +426,8 @@ foreach ($fields as $row) { <?php if (! empty($tbl_storage_engine) && ($tbl_storage_engine == 'MYISAM' || $tbl_storage_engine == 'ARIA' || $tbl_storage_engine == 'MARIA' || ($tbl_storage_engine == 'INNODB' && PMA_MYSQL_INT_VERSION >= 50604)) // FULLTEXT is possible on TEXT, CHAR and VARCHAR - && (strpos(' ' . $type, 'text') || strpos(' ' . $type, 'char'))) { + && (strpos(' ' . $type, 'text') || strpos(' ' . $type, 'char')) + ) { echo "\n"; ?> <td class="fulltext replaced_by_more center nowrap"> diff --git a/tbl_tracking.php b/tbl_tracking.php index 600192aadc..47306fdc31 100644 --- a/tbl_tracking.php +++ b/tbl_tracking.php @@ -67,8 +67,10 @@ if (isset($_REQUEST['report_export'])) { foreach ( $data as $entry ) { $timestamp = strtotime($entry['date']); - if ($timestamp >= $filter_ts_from && $timestamp <= $filter_ts_to && - ( in_array('*', $filter_users) || in_array($entry['username'], $filter_users) ) ) { + if ($timestamp >= $filter_ts_from + && $timestamp <= $filter_ts_to + && (in_array('*', $filter_users) || in_array($entry['username'], $filter_users)) + ) { $tmp_entries[] = array( 'id' => $id, 'timestamp' => $timestamp, 'username' => $entry['username'], @@ -493,8 +495,10 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) { } $timestamp = strtotime($entry['date']); - if ($timestamp >= $filter_ts_from && $timestamp <= $filter_ts_to && - ( in_array('*', $filter_users) || in_array($entry['username'], $filter_users) ) ) { + if ($timestamp >= $filter_ts_from + && $timestamp <= $filter_ts_to + && (in_array('*', $filter_users) || in_array($entry['username'], $filter_users)) + ) { ?> <tr class="noclick <?php echo $style; ?>"> <td><small><?php echo $i;?></small></td> @@ -549,8 +553,10 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) { } $timestamp = strtotime($entry['date']); - if ($timestamp >= $filter_ts_from && $timestamp <= $filter_ts_to && - ( in_array('*', $filter_users) || in_array($entry['username'], $filter_users) ) ) { + if ($timestamp >= $filter_ts_from + && $timestamp <= $filter_ts_to + && (in_array('*', $filter_users) || in_array($entry['username'], $filter_users)) + ) { ?> <tr class="noclick <?php echo $style; ?>"> <td><small><?php echo $i; ?></small></td> |