diff --git a/ChangeLog b/ChangeLog index 512600578..e6726012c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-06-08 Marc Delisle + * libraries/common.lib.php: bug #1216901, missing backquotes on the Browse + feature in case of duplicate entry + 2005-06-07 Marc Delisle * lang/tatarish*: updates, thanks to Albert Fazlí * config.inc.php: bug #1215950, typo in comment diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 9029a9e28..847fe8a43 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -724,13 +724,13 @@ if ($is_minimum_common == FALSE) { if (isset($mysql_error_values[0])) { $tmp_fields = PMA_DBI_get_fields($db, $table, NULL); foreach ($tmp_fields as $tmp_field) { - $duplicate_sql_query .= (($duplicate_sql_query!='') ? ' OR ' : '') . $tmp_field['Field'] . " LIKE '" . $mysql_error_values[0] . "'"; + $duplicate_sql_query .= (($duplicate_sql_query!='') ? ' OR ' : '') . PMA_backquote($tmp_field['Field']) . " LIKE '" . $mysql_error_values[0] . "'"; } } if ($duplicate_sql_query!='') { - $duplicate_sql_query = "SELECT * FROM " . $table . " WHERE (" . $duplicate_sql_query . ")"; + $duplicate_sql_query = "SELECT * FROM " . PMA_backquote($table) . " WHERE (" . $duplicate_sql_query . ")"; } else { - $duplicate_sql_query = "SELECT * FROM " . $table . ""; + $duplicate_sql_query = "SELECT * FROM " . PMA_backquote($table) . ""; } echo '
' ."\n" . ' ' . "\n"