bug 930445 when table_info not defined

This commit is contained in:
Marc Delisle
2004-04-13 12:39:55 +00:00
parent 031ecca8b7
commit 6003e8dd37
2 changed files with 8 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2004-04-13 Marc Delisle <lem9@users.sourceforge.net>
* libraries/relation.lib.php: bug 930445 when PMA_table_info not defined,
thanks to Philippe Jausions (jausions)
2004-04-12 Marcel Tschopp <marcel.tschopp@gmx.net> 2004-04-12 Marcel Tschopp <marcel.tschopp@gmx.net>
* left.php, tbl_properties_structure.php, libraries/mysql_charsets.lib.php, * left.php, tbl_properties_structure.php, libraries/mysql_charsets.lib.php,
libraries/relation.lib.php: Changed some queries to use libraries/relation.lib.php: Changed some queries to use

View File

@@ -1,7 +1,7 @@
<?php <?php
/* $Id$ */ /* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4: // vim: expandtab sw=4 ts=4 sts=4:
error_reporting(E_ALL);
/** /**
* Set of functions used with the relation and pdf feature * Set of functions used with the relation and pdf feature
*/ */
@@ -362,6 +362,9 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both') {
*/ */
function PMA_getDisplayField($db, $table) { function PMA_getDisplayField($db, $table) {
global $cfgRelation; global $cfgRelation;
if (trim(@$cfgRelation['table_info']) == '') {
return FALSE;
}
$disp_query = 'SELECT display_field FROM ' . PMA_backquote($cfgRelation['table_info']) $disp_query = 'SELECT display_field FROM ' . PMA_backquote($cfgRelation['table_info'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''