]> git.joonet.de Git - adminer.git/commitdiff
Use $adminer->editVal in enum_input function
authorJakub Vrana <jakub@vrana.cz>
Tue, 18 Jan 2011 13:06:23 +0000 (14:06 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 18 Jan 2011 13:06:23 +0000 (14:06 +0100)
adminer/include/functions.inc.php

index 2d82cb786a3cceddba3013c15e2cd6a8d464f1ff..ed4e5194144bb1ffb0108d6414571302c35982ad 100644 (file)
@@ -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;
 }