require musn't be used inside conditional statements

This commit is contained in:
Loïc Chapeaux
2002-10-04 08:28:34 +00:00
parent 53df7ad4fa
commit 5dbcad6527
3 changed files with 26 additions and 29 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-10-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_select.php3, tbl_change.php3: require musn't be used inside
conditional statements.
2002-10-03 Marc Delisle <lem9@users.sourceforge.net>
* tbl_select.php3, tbl_change.php3,
new libraries/get_foreign.lib.php3: drop-down of foreign keys

View File

@@ -392,7 +392,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
// The value column (depends on type)
// ----------------
require('./libraries/get_foreign.lib.php3');
include('./libraries/get_foreign.lib.php3');
if (isset($disp) && $disp) {
?>

View File

@@ -140,30 +140,23 @@ if (!isset($param) || $param[0] == '') {
<td bgcolor="<?php echo $bgcolor; ?>">
<?php
// <markus@noga.de>
$field=$fields_list[$i];
$field = $fields_list[$i];
require('./libraries/get_foreign.lib.php3');
if($foreigners && isset($foreigners[$field]) &&
isset($disp) && $disp) {
?>
<select name="fields[]">
<option value=""></option>
<?php
include('./libraries/get_foreign.lib.php3');
echo "\n";
if ($foreigners && isset($foreigners[$field]) && isset($disp) && $disp) {
echo ' <select name="fields[]">' . "\n";
echo ' <option value=""></option>' . "\n";
while ($relrow = @PMA_mysql_fetch_array($disp)) {
$key = $relrow[$foreign_field];
$value = (($foreign_display != FALSE) ? '-' . htmlspecialchars($relrow[$foreign_display]) : '');
echo ' <option value="' . urlencode($key) . '">'.
htmlspecialchars($key) . $value . '</option>' . "\n";
echo ' <option value="' . urlencode($key) . '">'
. htmlspecialchars($key) . $value . '</option>' . "\n";
} // end while
?>
</select>
<?php
echo ' </select>' . "\n";
} else {
?>
<input type="text" name="fields[]" size="40" class="textfield" />
<?php
echo ' <input type="text" name="fields[]" size="40" class="textfield" />' . "\n";
}
?>
<input type="hidden" name="names[]" value="<?php echo urlencode($fields_list[$i]); ?>" />