mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 14:12:51 +02:00
Editor: Display field comment's text inside [] only in edit form
This commit is contained in:
@@ -75,7 +75,7 @@ focus(document.getElementById('username'));
|
||||
}
|
||||
|
||||
function fieldName($field, $order = 0) {
|
||||
return h($field["comment"] != "" ? $field["comment"] : $field["field"]);
|
||||
return h(preg_replace('~\s+\[.*\]$~', '', ($field["comment"] != "" ? $field["comment"] : $field["field"])));
|
||||
}
|
||||
|
||||
function selectLinks($tableStatus, $set = "") {
|
||||
@@ -479,6 +479,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||
return '';
|
||||
}
|
||||
|
||||
function editHint($table, $field, $value) {
|
||||
return (preg_match('~\s+(\[.*\])$~', ($field["comment"] != "" ? $field["comment"] : $field["field"]), $match) ? h(" $match[1]") : '');
|
||||
}
|
||||
|
||||
function processInput($field, $value, $function = "") {
|
||||
if ($function == "now") {
|
||||
return "$function()";
|
||||
|
Reference in New Issue
Block a user