bug 1157972, db comments broken

This commit is contained in:
Marc Delisle
2005-03-07 14:56:26 +00:00
parent 5784420791
commit 287af827e5
2 changed files with 7 additions and 3 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-03-07 Marc Delisle <lem9@users.sourceforge.net>
* libraries/relation.lib.php: db comments broken
2005-03-07 Michal Čihař <michal@cihar.com>
* db_printview.php, tbl_printview.php, css/phpmyadmin.css.php,
libraries/header_meta_style.inc.php: Actually use print style in themes,

View File

@@ -1,7 +1,7 @@
<?php
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:
error_reporting(E_ALL);
/**
* Set of functions used with the relation and pdf feature
*/
@@ -519,7 +519,7 @@ function PMA_handleSlashes($val) {
* Set a single comment to a certain value.
*
* @param string the name of the db
* @param string the name of the table
* @param string the name of the table (may be empty in case of a db comment)
* @param string the name of the column
* @param string the value of the column
* @param string (optional) if a column is renamed, this is the name of the former key which will get deleted
@@ -545,7 +545,8 @@ function PMA_setComment($db, $table, $col, $comment, $removekey = '', $mode='aut
}
}
if ($mode == 'native') {
// native mode is only for column comments so we need a table name
if ($mode == 'native' && !empty($table)) {
$fields = PMA_DBI_get_fields($db, $table);
// TODO: get directly the information of $col
foreach($fields as $key=>$field) {