mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 12:00:41 +02:00
Use $adminer->editVal in enum_input function
This commit is contained in:
@@ -623,12 +623,13 @@ function column_foreign_keys($table) {
|
|||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function enum_input($type, $attrs, $field, $value) {
|
function enum_input($type, $attrs, $field, $value) {
|
||||||
|
global $adminer;
|
||||||
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
||||||
$return = "";
|
$return = "";
|
||||||
foreach ($matches[1] as $i => $val) {
|
foreach ($matches[1] as $i => $val) {
|
||||||
$val = stripcslashes(str_replace("''", "'", $val));
|
$val = stripcslashes(str_replace("''", "'", $val));
|
||||||
$checked = (is_int($value) ? $value == $i+1 : (is_array($value) ? in_array($i+1, $value) : $value === $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;
|
return $return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user