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

Enum editing

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1240 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-11-12 15:25:21 +00:00
parent e70157827f
commit ec0282b7d7
3 changed files with 11 additions and 6 deletions

View File

@@ -394,6 +394,9 @@ ORDER BY ORDINAL_POSITION");
function editInput($table, $field, $attrs, $value) {
global $connection;
if ($field["type"] == "enum") {
return ($field["null"] ? "<input type='radio'$attrs value=''" . ($value || isset($_GET["select"]) ? "" : " checked") . ">" : "");
}
$foreignKeys = column_foreign_keys($table);
foreach ((array) $foreignKeys[$field["field"]] as $foreignKey) {
if (count($foreignKey["source"]) == 1) {