1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-20 13:21:30 +02:00

Ignore tables and fields with empty name

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@861 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-21 13:59:02 +00:00
parent 2faa08cd15
commit 116c873671
5 changed files with 56 additions and 36 deletions

View File

@@ -3,7 +3,7 @@ $where = (isset($_GET["select"]) ? (count($_POST["check"]) == 1 ? where_check($_
$update = ($where && !$_POST["clone"]);
$fields = fields($_GET["edit"]);
foreach ($fields as $name => $field) {
if (isset($_GET["default"]) ? $field["auto_increment"] || ereg('text|blob', $field["type"]) : !isset($field["privileges"][$update ? "update" : "insert"])) {
if ((isset($_GET["default"]) ? $field["auto_increment"] || ereg('text|blob', $field["type"]) : !isset($field["privileges"][$update ? "update" : "insert"])) || !strlen(adminer_field_name($fields, $name))) {
unset($fields[$name]);
}
}