From 0b7a3b4239d9d24dced03b766f3857ed49458e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 24 Jun 2005 14:08:44 +0000 Subject: [PATCH] Display column comment while editing data (RFE #860912). --- ChangeLog | 1 + tbl_change.php | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0a36c0442..e7bb15788 100755 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ $Source$ code for browsing directory with themes (RFE #1184251). * tbl_change.php: Use select instead of input, this saves some place and looks better (RFE #1169931). + * tbl_change.php: Display column comment while editing data (RFE #860912). 2005-06-24 Marc Delisle * db_operations.php: problem renaming a db diff --git a/tbl_change.php b/tbl_change.php index 156265b4c..98ff47a2e 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -72,6 +72,21 @@ $url_query = PMA_generate_common_url($db, $table) require('./tbl_properties_table_info.php'); +/* Get comments */ + +$comments_map = array(); + +if ($GLOBALS['cfg']['ShowPropertyComments']) { + require_once('./libraries/relation.lib.php'); + require_once('./libraries/transformations.lib.php'); + + $cfgRelation = PMA_getRelationsParam(); + + if ($cfgRelation['commwork']) { + $comments_map = PMA_getComments($db, $table); + } +} + /** * Displays top menu links */ @@ -329,10 +344,15 @@ foreach ($loop_array AS $vrowcount => $vrow) { : PMA_DBI_field_len($vresult, $i); $first_timestamp = 0; + $field_name = htmlspecialchars($field); + if (isset($comments_map[$field])) { + $field_name = '' . $field_name . ''; + } + $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?> - align="center" bgcolor=""> + align="center" bgcolor="">