mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 11:34:10 +02:00
Display only first five columns in Editor example
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@919 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -23,14 +23,14 @@ function adminer_object() {
|
||||
return ($login == 'admin');
|
||||
}
|
||||
|
||||
function tableName($row) {
|
||||
function tableName($tableStatus) {
|
||||
// tables without comments would return empty string and will be ignored by Adminer
|
||||
return htmlspecialchars($row["Comment"]);
|
||||
return htmlspecialchars($tableStatus["Comment"]);
|
||||
}
|
||||
|
||||
function fieldName($field) {
|
||||
// fields without comments will be ignored
|
||||
return ($field ? htmlspecialchars($field["comment"]) : "*");
|
||||
function fieldName($field, $order = 0) {
|
||||
// only first five columns with comments will be displayed
|
||||
return ($order < 5 ? htmlspecialchars($field["comment"]) : "");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class Adminer {
|
||||
return htmlspecialchars(strlen($tableStatus["Comment"]) ? $tableStatus["Comment"] : $tableStatus["Name"]);
|
||||
}
|
||||
|
||||
function fieldName($field) {
|
||||
function fieldName($field, $order = 0) {
|
||||
return htmlspecialchars(strlen($field["comment"]) ? $field["comment"] : $field["field"]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user