Permalink
Browse files

Use $adminer->editVal in enum_input function

  • Loading branch information...
1 parent 5b6b0e1 commit c0682062ca1ec3a90e0b485ee9d2009abfe89243 @vrana committed Jan 18, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 adminer/include/functions.inc.php
@@ -623,12 +623,13 @@ function column_foreign_keys($table) {
* @return null
*/
function enum_input($type, $attrs, $field, $value) {
+ global $adminer;
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
$return = "";
foreach ($matches[1] as $i => $val) {
$val = stripcslashes(str_replace("''", "'", $val));
$checked = (is_int($value) ? $value == $i+1 : (is_array($value) ? in_array($i+1, $value) : $value === $val));
- $return .= " <label><input type='$type'$attrs value='" . ($i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($val) . '</label>';
+ $return .= " <label><input type='$type'$attrs value='" . ($i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($adminer->editVal($val, $field)) . '</label>';
}
return $return;
}

0 comments on commit c068206

Please sign in to comment.