protect view name with backquotes

This commit is contained in:
Marc Delisle
2008-06-24 14:11:54 +00:00
parent ed1dc76e48
commit d4074c1976
2 changed files with 2 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
thanks to Richard Heaton - wotnot
- bug [XHTML] problem with tabindex and radio fields
- bug #1971221 [interface] tabindex not set correctly
- bug [views] VIEW name created via the GUI was not protected with backquotes
2.11.7.0 (2008-06-23)
- bug #1908719 [interface] New field cannot be auto-increment and primary key

View File

@@ -29,7 +29,7 @@ if (isset($_POST['submitoptions'])) {
if (isset($_POST['algorithm'])) {
$create_query .= ' ALGORITHM = ' . $_POST['algorithm'] . $sep;
}
$create_query .= ' VIEW ' . $_POST['view_name'] . $sep;
$create_query .= ' VIEW ' . PMA_backquote($_POST['view_name']) . $sep;
if (!empty($_POST['column_names'])) {
$create_query .= ' (' . $_POST['column_names'] . ')' . $sep;