' . (count($select) != count($group) || information_schema($_GET["db"]) ? '' : ' ' . lang('edit') . '');
foreach ($row as $key => $val) {
- $name = adminer_field_name($fields, $key);
- if (strlen($name)) {
+ if (strlen($names[$key])) {
if (strlen($val) && (!isset($email_fields[$key]) || strlen($email_fields[$key]))) {
- $email_fields[$key] = (is_email($val) ? $name : ""); //! filled e-mails may be contained on other pages
+ $email_fields[$key] = (is_email($val) ? $names[$key] : ""); //! filled e-mails may be contained on other pages
}
$link = "";
if (!isset($val)) {
diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php
index 3e33d18c..27f75fe2 100644
--- a/editor/include/adminer.inc.php
+++ b/editor/include/adminer.inc.php
@@ -32,8 +32,8 @@ function adminer_table_name($row) {
return call_adminer('table_name', htmlspecialchars(strlen($row["Comment"]) ? $row["Comment"] : $row["Name"]), $row);
}
-function adminer_field_name($fields, $key) {
- return call_adminer('field_name', htmlspecialchars(strlen($fields[$key]["comment"]) ? $fields[$key]["comment"] : $key), $fields, $key);
+function adminer_field_name($field) {
+ return call_adminer('field_name', ($field ? htmlspecialchars(strlen($field["comment"]) ? $field["comment"] : $field["field"]) : "*"), $field);
}
function adminer_select_links($table_status) {
diff --git a/examples/editor-cds/index.php b/examples/editor-cds/index.php
index 5a777e3f..0f9c1002 100644
--- a/examples/editor-cds/index.php
+++ b/examples/editor-cds/index.php
@@ -32,9 +32,9 @@ class Adminer {
return htmlspecialchars($row["Comment"]);
}
- function field_name($fields, $key) {
+ function field_name($field) {
// fields without comments will be ignored
- return htmlspecialchars($fields[$key]["comment"]);
+ return ($field ? htmlspecialchars($field["comment"]) : "*");
}
}
|