Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

when showing data in table, use the column name, even if it has a column comment #61

Closed
wants to merge 1 commit into from

2 participants

@wesyah234

... in the table header, and instead show a question mark with tooltip that will show the column comment.
Also changed to show the table and columns directly instead of the comments, when displaying in other places.

wrood when showing data in table, use the column name, even if it has a column
comment in the table header, and instead show a question mark with
tooltip that will show the column comment.
Also changed to show the table and columns directly instead of the
comments, when displaying in other places.
03cc57b
@vrana
Owner

This is one of the key Adminer Editor features. You can easily override it with a plugin.

@vrana vrana closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2013
  1. when showing data in table, use the column name, even if it has a column

    wrood authored
    comment in the table header, and instead show a question mark with
    tooltip that will show the column comment.
    Also changed to show the table and columns directly instead of the
    comments, when displaying in other places.
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 4 deletions.
  1. +5 −2 adminer/select.inc.php
  2. +2 −2 editor/include/adminer.inc.php
View
7 adminer/select.inc.php
@@ -302,8 +302,11 @@
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
$desc = "&desc%5B0%5D=1";
echo '<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">';
- echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
- echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
+ if (isset($field['comment']) && $field['comment'] != '') {
+ echo '<a title="'.$field['comment'].'">?</a> ';
+ }
+ echo '<a title="'.$field['comment'].'" href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
+ echo apply_sql_function($val["fun"], $field['field']) . "</a>"; //! columns looking like functions
echo "<span class='column hidden'>";
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
if (!$val["fun"]) {
View
4 editor/include/adminer.inc.php
@@ -65,11 +65,11 @@ function login($login, $password) {
}
function tableName($tableStatus) {
- return h($tableStatus["Comment"] != "" ? $tableStatus["Comment"] : $tableStatus["Name"]);
+ return h($tableStatus["Name"]);
}
function fieldName($field, $order = 0) {
- return h($field["comment"] != "" ? $field["comment"] : $field["field"]);
+ return h($field["field"]);
}
function selectLinks($tableStatus, $set = "") {
Something went wrong with that request. Please try again.