1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Trim identifiers (bug #3405309)

This commit is contained in:
Jakub Vrana
2011-09-10 13:06:59 +02:00
parent bed3856f2d
commit ef867e6bd1
9 changed files with 26 additions and 20 deletions

View File

@@ -2,10 +2,11 @@
$TABLE = $_GET["view"];
$dropped = false;
if ($_POST && !$error) {
$name = trim($_POST["name"]);
$dropped = drop_create(
"DROP VIEW " . table($TABLE),
"CREATE VIEW " . table($_POST["name"]) . " AS\n$_POST[select]",
($_POST["drop"] ? substr(ME, 0, -1) : ME . "table=" . urlencode($_POST["name"])),
"CREATE VIEW " . table($name) . " AS\n$_POST[select]",
($_POST["drop"] ? substr(ME, 0, -1) : ME . "table=" . urlencode($name)),
lang('View has been dropped.'),
lang('View has been altered.'),
lang('View has been created.'),