bug #1216901, missing backquotes on the Browse feature in case of duplicate entry

This commit is contained in:
Marc Delisle
2005-06-08 16:58:00 +00:00
parent ee99a9746d
commit ab217262ea
2 changed files with 7 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-06-08 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1216901, missing backquotes on the Browse
feature in case of duplicate entry
2005-06-07 Marc Delisle <lem9@users.sourceforge.net>
* lang/tatarish*: updates, thanks to Albert Fazlí
* config.inc.php: bug #1215950, typo in comment

View File

@@ -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 ' <form method="post" action="read_dump.php" style="padding: 0px; margin: 0px">' ."\n"
. ' <input type="hidden" name="sql_query" value="' . $duplicate_sql_query . '" />' . "\n"