do not display a foreign if not asked for by user

This commit is contained in:
Marc Delisle
2003-07-10 13:12:21 +00:00
parent d6415f2bbd
commit 204d5de0a4
2 changed files with 12 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2003-07-10 Marc Delisle <lem9@users.sourceforge.net>
* pdf_schema.php3: do not display a foreign table if it's not selected
by user to be on the schema
2003-07-10 Michal Cihar <nijel@users.sourceforge.net> 2003-07-10 Michal Cihar <nijel@users.sourceforge.net>
* lang/spanish: Updated, thanks to Daniel Hinostroza (dhinostroza). * lang/spanish: Updated, thanks to Daniel Hinostroza (dhinostroza).
* lang/italian: Updated, thanks to Pietro Danesi (danone). * lang/italian: Updated, thanks to Pietro Danesi (danone).

View File

@@ -733,7 +733,6 @@ class PMA_RT_Table
list($this->x, $this->y) = PMA_mysql_fetch_array($result); list($this->x, $this->y) = PMA_mysql_fetch_array($result);
$this->x = (double) $this->x; $this->x = (double) $this->x;
$this->y = (double) $this->y; $this->y = (double) $this->y;
// displayfield // displayfield
$this->displayfield = PMA_getDisplayField($db, $table_name); $this->displayfield = PMA_getDisplayField($db, $table_name);
@@ -1208,7 +1207,14 @@ class PMA_RT
if ($exist_rel) { if ($exist_rel) {
$seen_a_relation = TRUE; $seen_a_relation = TRUE;
while (list($master_field,$rel) = each($exist_rel)) { while (list($master_field,$rel) = each($exist_rel)) {
$this->PMA_RT_addRelation($one_table , $master_field, $rel['foreign_table'], $rel['foreign_field']); // put the foreign table on the schema only if selected
// by the user
// (do not use array_search() because we would have to
// to do a === FALSE and this is not PHP3 compatible)
if (PMA_isInto($rel['foreign_table'], $alltables)> -1) {
$this->PMA_RT_addRelation($one_table , $master_field, $rel['foreign_table'], $rel['foreign_field']);
}
} // end while } // end while
} // end if } // end if