bug 619100
This commit is contained in:
@@ -9,6 +9,8 @@ $Source$
|
||||
* libraries/display_tbl.lib.php3: clicking on a COUNT() column to sort
|
||||
* read_dump.php3: bug 634074: we now use is_writeable() on the tmp
|
||||
subdir, instead of looking for a dot in the open_basedir path
|
||||
* tbl_relation.php3: show a field in "Links to" if it has been defined
|
||||
manually in the relationtable, even if it's not a key in the foreign table
|
||||
|
||||
2002-11-22 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/display_tbl.lib.php3: numeric foreign keys used as alias
|
||||
|
@@ -236,22 +236,34 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
|
||||
<?php
|
||||
echo "\n";
|
||||
reset($selectboxall);
|
||||
$myfield = $save_row[$i]['Field'];
|
||||
if (isset($existrel[$myfield])) {
|
||||
$foreign_field = $existrel[$myfield]['foreign_db'] . '.'
|
||||
. $existrel[$myfield]['foreign_table'] . '.'
|
||||
. $existrel[$myfield]['foreign_field'];
|
||||
} else {
|
||||
$foreign_field = FALSE;
|
||||
}
|
||||
$seen_key = FALSE;
|
||||
while (list($key, $value) = each($selectboxall)) {
|
||||
$myfield = $save_row[$i]['Field'];
|
||||
if (isset($existrel[$myfield])) {
|
||||
$test = $existrel[$myfield]['foreign_db'] . '.'
|
||||
. $existrel[$myfield]['foreign_table'] . '.'
|
||||
. $existrel[$myfield]['foreign_field'];
|
||||
} else {
|
||||
$test = FALSE;
|
||||
}
|
||||
echo ' '
|
||||
. '<option value="' . htmlspecialchars($key) . '"';
|
||||
if ($test && $key == $test) {
|
||||
if ($foreign_field && $key == $foreign_field) {
|
||||
echo ' selected="selected"';
|
||||
$seen_key = TRUE;
|
||||
}
|
||||
echo '>' . $value . '</option>'. "\n";
|
||||
} // end while
|
||||
|
||||
// if the link defined in relationtable points to a foreign field
|
||||
// that is not a key in the foreign table, we show the link
|
||||
// (will not be shown with an arrow)
|
||||
if ($foreign_field && !$seen_key) {
|
||||
echo ' '
|
||||
. '<option value="' . htmlspecialchars($foreign_field) . '"';
|
||||
echo ' selected="selected"';
|
||||
echo '>' . $foreign_field . '</option>'. "\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user