Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: phpmyadmin/phpmyadmin
...
head fork: phpmyadmin/phpmyadmin
  • 4 commits
  • 52 files changed
  • 0 commit comments
  • 1 contributor
Showing with 297 additions and 194 deletions.
  1. +3 −2 db_operations.php
  2. +2 −1  db_qbe.php
  3. +4 −2 libraries/Config.class.php
  4. +4 −2 libraries/Theme_Manager.class.php
  5. +12 −8 libraries/auth/cookie.auth.lib.php
  6. +5 −2 libraries/auth/http.auth.lib.php
  7. +2 −1  libraries/common.inc.php
  8. +3 −4 libraries/common.lib.php
  9. +6 −4 libraries/config/ConfigFile.class.php
  10. +6 −3 libraries/config/FormDisplay.class.php
  11. +2 −1  libraries/config/validate.lib.php
  12. +18 −12 libraries/display_git_revision.lib.php
  13. +2 −1  libraries/display_import.lib.php
  14. +2 −1  libraries/display_import_ajax.lib.php
  15. +5 −3 libraries/import/csv.php
  16. +2 −1  libraries/import/docsql.php
  17. +3 −2 libraries/import/sql.php
  18. +59 −38 libraries/sqlparser.lib.php
  19. +2 −1  libraries/sqlvalidator.lib.php
  20. +13 −9 libraries/tbl_properties.inc.php
  21. +3 −5 libraries/transformations/application_octetstream__download.inc.php
  22. +1 −1  libraries/transformations/application_octetstream__hex.inc.php
  23. +1 −1  libraries/transformations/image_jpeg__inline.inc.php
  24. +1 −1  libraries/transformations/image_jpeg__link.inc.php
  25. +1 −1  libraries/transformations/image_png__inline.inc.php
  26. +1 −1  libraries/transformations/text_plain__append.inc.php
  27. +6 −6 libraries/transformations/text_plain__dateformat.inc.php
  28. +3 −3 libraries/transformations/text_plain__external.inc.php
  29. +1 −1  libraries/transformations/text_plain__formatted.inc.php
  30. +1 −1  libraries/transformations/text_plain__imagelink.inc.php
  31. +2 −2 libraries/transformations/text_plain__link.inc.php
  32. +1 −1  libraries/transformations/text_plain__longToIpv4.inc.php
  33. +1 −1  libraries/transformations/text_plain__sql.inc.php
  34. +1 −1  libraries/transformations/text_plain__substr.inc.php
  35. +12 −8 main.php
  36. +8 −3 navigation.php
  37. +2 −1  phpmyadmin.css.php
  38. +9 −6 pmd_general.php
  39. +2 −1  pmd_relation_new.php
  40. +9 −5 prefs_manage.php
  41. +4 −2 querywindow.php
  42. +13 −12 schema_edit.php
  43. +2 −1  server_databases.php
  44. +2 −1  show_config_errors.php
  45. +2 −1  tbl_addfield.php
  46. +3 −2 tbl_alter.php
  47. +5 −3 tbl_create.php
  48. +2 −1  tbl_export.php
  49. +27 −15 tbl_operations.php
  50. +2 −1  tbl_row_action.php
  51. +2 −1  tbl_structure.php
  52. +12 −6 tbl_tracking.php
View
5 db_operations.php
@@ -457,8 +457,9 @@
// 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">
View
3  db_qbe.php
@@ -254,7 +254,8 @@ function showColumnSelectCell($columns, $column_number, $selected = '')
// 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
View
6 libraries/Config.class.php
@@ -366,7 +366,8 @@ function isGitRevision()
// 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 @@ function checkGitRevision()
// 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;
}
View
6 libraries/Theme_Manager.class.php
@@ -122,7 +122,8 @@ function init()
// 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 @@ function init()
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
View
20 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) {
View
7 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;
View
3  libraries/common.inc.php
@@ -819,7 +819,8 @@
if (isset($GLOBALS['collation_connection'])) {
$GLOBALS['PMA_Config']->setCookie(
'pma_collation_connection',
- $GLOBALS['collation_connection']);
+ $GLOBALS['collation_connection']
+ );
}
$_SESSION['PMA_Theme_Manager']->setThemeCookie();
View
7 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;
}
View
10 libraries/config/ConfigFile.class.php
@@ -221,9 +221,10 @@ public function set($path, $value, $canonical_path = null)
$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 @@ public function removeServer($server)
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']);
}
}
View
9 libraries/config/FormDisplay.class.php
@@ -449,7 +449,8 @@ private function _validateSelect(&$value, array $allowed)
// 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 @@ public function save($forms, $allow_partial_save = true)
// 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 @@ private function _setComments($system_path, array &$opts)
}
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]);
}
}
View
3  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;
View
30 libraries/display_git_revision.lib.php
@@ -27,19 +27,21 @@ function PMA_printGitRevision()
. htmlspecialchars($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_MESSAGE')) . '">'
. $commit_hash . '</strong>';
if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTECOMMIT')) {
- $commit_hash =
- '<a href="'
- . PMA_linkURL('https://github.com/phpmyadmin/phpmyadmin/commit/'
- . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH'))
+ $commit_hash = '<a href="'
+ . PMA_linkURL(
+ 'https://github.com/phpmyadmin/phpmyadmin/commit/'
+ . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH')
+ )
. '" target="_blank">' . $commit_hash . '</a>';
}
$branch = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH');
if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTEBRANCH')) {
- $branch =
- '<a href="'
- . PMA_linkURL('https://github.com/phpmyadmin/phpmyadmin/tree/'
- . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH'))
+ $branch = '<a href="'
+ . PMA_linkURL(
+ 'https://github.com/phpmyadmin/phpmyadmin/tree/'
+ . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH')
+ )
. '" target="_blank">' . $branch . '</a>';
}
if ($branch !== false) {
@@ -51,22 +53,26 @@ function PMA_printGitRevision()
ob_start();
$committer = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITTER');
$author = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_AUTHOR');
- PMA_printListItem(__('Git revision') . ': '
+ PMA_printListItem(
+ __('Git revision') . ': '
. $branch . ',<br /> '
. sprintf(
__('committed on %1$s by %2$s'),
PMA_localisedDate(strtotime($committer['date'])),
'<a href="' . PMA_linkURL('mailto:' . $committer['email']) . '">'
- . htmlspecialchars($committer['name']) . '</a>')
+ . htmlspecialchars($committer['name']) . '</a>'
+ )
. ($author != $committer
? ', <br />'
. sprintf(
__('authored on %1$s by %2$s'),
PMA_localisedDate(strtotime($author['date'])),
'<a href="' . PMA_linkURL('mailto:' . $author['email']) . '">'
- . htmlspecialchars($author['name']) . '</a>')
+ . htmlspecialchars($author['name']) . '</a>'
+ )
: ''),
- 'li_pma_version_git', null, null, null);
+ 'li_pma_version_git', null, null, null
+ );
$item = ob_get_contents();
ob_end_clean();
PMA_ajaxResponse($item, true);
View
3  libraries/display_import.lib.php
@@ -236,7 +236,8 @@ function(response) {
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>';
View
3  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;
View
8 libraries/import/csv.php
@@ -234,9 +234,11 @@
}
$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;
}
}
View
3  libraries/import/docsql.php
@@ -19,7 +19,8 @@
* 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;
}
View
5 libraries/import/sql.php
@@ -218,7 +218,8 @@
// 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 @@
&& (($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);
View
97 libraries/sqlparser.lib.php
@@ -318,7 +318,8 @@ function PMA_SQP_parse($sql)
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 @@ function PMA_SQP_parse($sql)
|| $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 @@ function PMA_SQP_parse($sql)
|| ($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 @@ function PMA_SQP_analyze($arr)
|| $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 @@ function PMA_SQP_analyze($arr)
} // 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 @@ function PMA_SQP_analyze($arr)
// 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 @@ function PMA_SQP_analyze($arr)
* @todo explain this:
*/
if (($arr[$i]['type'] == 'alpha_reservedWord')
- && ($upper_data != 'FROM')) {
+ && ($upper_data != 'FROM')
+ ) {
$previous_was_identifier = true;
}
@@ -1318,7 +1323,8 @@ function PMA_SQP_analyze($arr)
&& ($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 @@ function PMA_SQP_analyze($arr)
// 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 @@ function PMA_SQP_analyze($arr)
// 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 @@ function PMA_SQP_analyze($arr)
// 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 @@ function PMA_SQP_analyze($arr)
$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 @@ function PMA_SQP_analyze($arr)
$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 @@ function PMA_SQP_analyze($arr)
) {
$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 @@ function PMA_SQP_formatHtml($arr, $mode='color', $start_token=0,
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 @@ function PMA_SQP_formatHtml($arr, $mode='color', $start_token=0,
// 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 @@ function PMA_SQP_formatHtml($arr, $mode='color', $start_token=0,
|| (($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
View
3  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
View
22 libraries/tbl_properties.inc.php
@@ -354,8 +354,9 @@
// 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 @@
// 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;
View
8 libraries/transformations/application_octetstream__download.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_application_octetstream__download_info()
{
return array(
'info' => __('Displays a link to download the binary data of the column. You can use the first option to specify the filename, or use the second option as the name of a column which contains the filename. If you use the second option, you need to set the first option to the empty string.'),
- );
+ );
}
/**
@@ -40,15 +40,13 @@ function PMA_transformation_application_octetstream__download(&$buffer, $options
}
}
- return
- sprintf(
+ return sprintf(
'<a href="transformation_wrapper.php%s&amp;ct=application/octet-stream&amp;cn=%s" title="%s">%s</a>',
-
$options['wrapper_link'],
urlencode($cn),
htmlspecialchars($cn),
htmlspecialchars($cn)
- );
+ );
}
?>
View
2  libraries/transformations/application_octetstream__hex.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_application_octetstream__hex_info()
{
return array(
'info' => __('Displays hexadecimal representation of data. Optional first parameter specifies how often space will be added (defaults to 2 nibbles).'),
- );
+ );
}
/**
View
2  libraries/transformations/image_jpeg__inline.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_image_jpeg__inline_info()
{
return array(
'info' => __('Displays a clickable thumbnail. The options are the maximum width and height in pixels. The original aspect ratio is preserved.'),
- );
+ );
}
/**
View
2  libraries/transformations/image_jpeg__link.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_image_jpeg__link_info()
{
return array(
'info' => __('Displays a link to download this image.'),
- );
+ );
}
/**
View
2  libraries/transformations/image_png__inline.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_image_png__inline_info()
{
return array(
'info' => __('Displays a clickable thumbnail. The options are the maximum width and height in pixels. The original aspect ratio is preserved.'),
- );
+ );
}
/**
View
2  libraries/transformations/text_plain__append.inc.php
@@ -12,7 +12,7 @@ function PMA_transformation_text_plain__append_info()
{
return array(
'info' => __('Appends text to a string. The only option is the text to be appended (enclosed in single quotes, default empty string).'),
- );
+ );
}
function PMA_transformation_text_plain__append($buffer, $options = array(), $meta = '')
View
12 libraries/transformations/text_plain__dateformat.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__dateformat_info()
{
return array(
'info' => __('Displays a TIME, TIMESTAMP, DATETIME or numeric unix timestamp column as formatted date. The first option is the offset (in hours) which will be added to the timestamp (Default: 0). Use second option to specify a different date/time format string. Third option determines whether you want to see local date or UTC one (use "local" or "utc" strings) for that. According to that, date format has different value - for "local" see the documentation for PHP\'s strftime() function and for "utc" it is done using gmdate() function.'),
- );
+ );
}
/**
@@ -48,10 +48,10 @@ function PMA_transformation_text_plain__dateformat($buffer, $options = array(),
if ($meta->type == 'int') {
$timestamp = $buffer;
- // Detect TIMESTAMP(6 | 8 | 10 | 12 | 14)
- // TIMESTAMP (2 | 4) not supported here.
- // (Note: prior to MySQL 4.1, TIMESTAMP has a display size, for example
- // TIMESTAMP(8) means YYYYMMDD)
+ // Detect TIMESTAMP(6 | 8 | 10 | 12 | 14)
+ // TIMESTAMP (2 | 4) not supported here.
+ // (Note: prior to MySQL 4.1, TIMESTAMP has a display size, for example
+ // TIMESTAMP(8) means YYYYMMDD)
} else if (preg_match('/^(\d{2}){3,7}$/', $buffer)) {
if (strlen($buffer) == 14 || strlen($buffer) == 8) {
@@ -71,7 +71,7 @@ function PMA_transformation_text_plain__dateformat($buffer, $options = array(),
if (checkdate($d['month'], $d['day'], $d['year'])) {
$timestamp = mktime($d['hour'], $d['minute'], $d['second'], $d['month'], $d['day'], $d['year']);
}
- // If all fails, assume one of the dozens of valid strtime() syntaxes (http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html)
+ // If all fails, assume one of the dozens of valid strtime() syntaxes (http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html)
} else {
if (preg_match('/^[0-9]\d{1,9}$/', $buffer)) {
$timestamp = (int)$buffer;
View
6 libraries/transformations/text_plain__external.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__external_info()
{
return array(
'info' => __('LINUX ONLY: Launches an external application and feeds it the column data via standard input. Returns the standard output of the application. The default is Tidy, to pretty-print HTML code. For security reasons, you have to manually edit the file libraries/transformations/text_plain__external.inc.php and list the tools you want to make available. The first option is then the number of the program you want to use and the second option is the parameters for the program. The third option, if set to 1, will convert the output using htmlspecialchars() (Default 1). The fourth option, if set to 1, will prevent wrapping and ensure that the output appears all on one line (Default 1).'),
- );
+ );
}
/**
@@ -80,8 +80,8 @@ function PMA_transformation_text_plain__external($buffer, $options = array(), $m
// needs PHP >= 4.3.0
$newstring = '';
$descriptorspec = array(
- 0 => array("pipe", "r"),
- 1 => array("pipe", "w")
+ 0 => array("pipe", "r"),
+ 1 => array("pipe", "w")
);
$process = proc_open($program . ' ' . $poptions, $descriptorspec, $pipes);
if (is_resource($process)) {
View
2  libraries/transformations/text_plain__formatted.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__formatted_info()
{
return array(
'info' => __('Displays the contents of the column as-is, without running it through htmlspecialchars(). That is, the column is assumed to contain valid HTML.'),
- );
+ );
}
/**
View
2  libraries/transformations/text_plain__imagelink.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__imagelink_info()
{
return array(
'info' => __('Displays an image and a link; the column contains the filename. The first option is a URL prefix like "http://www.example.com/". The second and third options are the width and the height in pixels.'),
- );
+ );
}
/**
View
4 libraries/transformations/text_plain__link.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__link_info()
{
return array(
'info' => __('Displays a link; the column contains the filename. The first option is a URL prefix like "http://www.example.com/". The second option is a title for the link.'),
- );
+ );
}
/**
@@ -19,7 +19,7 @@ function PMA_transformation_text_plain__link_info()
*/
function PMA_transformation_text_plain__link($buffer, $options = array(), $meta = '')
{
-// $transform_options = array ('string' => '<a href="' . (isset($options[0]) ? $options[0] : '') . '%1$s" title="' . (isset($options[1]) ? $options[1] : '%1$s') . '">' . (isset($options[1]) ? $options[1] : '%1$s') . '</a>');
+ // $transform_options = array ('string' => '<a href="' . (isset($options[0]) ? $options[0] : '') . '%1$s" title="' . (isset($options[1]) ? $options[1] : '%1$s') . '">' . (isset($options[1]) ? $options[1] : '%1$s') . '</a>');
$transform_options = array ('string' => '<a href="' . PMA_linkURL((isset($options[0]) ? $options[0] : '') . $buffer) . '" title="' . (isset($options[1]) ? $options[1] : '') . '">' . (isset($options[1]) ? $options[1] : $buffer) . '</a>');
View
2  libraries/transformations/text_plain__longToIpv4.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__longToIpv4_info()
{
return array(
'info' => __('Converts an (IPv4) Internet network address into a string in Internet standard dotted format.'),
- );
+ );
}
/**
View
2  libraries/transformations/text_plain__sql.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__sql_info()
{
return array(
'info' => __('Formats text as SQL query with syntax highlighting.'),
- );
+ );
}
/**
View
2  libraries/transformations/text_plain__substr.inc.php
@@ -11,7 +11,7 @@ function PMA_transformation_text_plain__substr_info()
{
return array(
'info' => __('Displays a part of a string. The first option is the number of characters to skip from the beginning of the string (Default 0). The second option is the number of characters to return (Default: until end of string). The third option is the string to append and/or prepend when truncation occurs (Default: "...").'),
- );
+ );
}
/**
View
20 main.php
@@ -56,7 +56,7 @@
$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 @@
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 @@
* 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 @@
);
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 @@
* 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 @@
/**
* 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);
}
View
11 navigation.php
@@ -239,7 +239,8 @@ function PMA_exitNavigationFrame()
$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 . '"'
View
3  phpmyadmin.css.php
@@ -18,7 +18,8 @@
// 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');
}
View
15 pmd_general.php
@@ -303,16 +303,19 @@ class="M_butt" target="_self">';
?>
<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="*" />
View
3  pmd_relation_new.php
@@ -24,7 +24,8 @@
// 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
View
14 prefs_manage.php
@@ -139,24 +139,28 @@
// 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;
}
View
6 querywindow.php
@@ -43,7 +43,8 @@
);
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 @@
$_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>';
View
25 schema_edit.php
@@ -59,10 +59,10 @@
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 @@
$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 @@
//]]>
</script>
<?php
- }
+ }
} // end if
} // end if ($cfgRelation['pdfwork'])
View
3  server_databases.php
@@ -91,7 +91,8 @@
$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'])) {
View
3  show_config_errors.php
@@ -10,7 +10,8 @@
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');
View
3  tbl_addfield.php
@@ -54,7 +54,8 @@
$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;
}
View
5 tbl_alter.php
@@ -134,8 +134,9 @@
// 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])
View
8 tbl_create.php
@@ -210,11 +210,13 @@
// 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],
View
3  tbl_export.php
@@ -55,7 +55,8 @@
$wheres = array();
if (isset($where_clause) && is_array($where_clause)
- && count($where_clause) > 0) {
+ && count($where_clause) > 0
+ ) {
$wheres[] = '(' . implode(') OR (', $where_clause) . ')';
}
View
42 tbl_operations.php
@@ -97,11 +97,13 @@
}
}
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)
+ ) {