enum values not displayed

This commit is contained in:
Marc Delisle
2001-08-08 19:32:17 +00:00
parent 4e28f49239
commit bffd92c15e
2 changed files with 8 additions and 5 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2001-08-08 Marc Delisle <lem9@users.sourceforge.net>
* tbl_change.php3, enum values were not displayed
2001-08-08 Olivier M<>ller <om@omnis.ch> 2001-08-08 Olivier M<>ller <om@omnis.ch>
* new script create-release.sh * new script create-release.sh
* moved scripts to a new subdirectory "scripts/" * moved scripts to a new subdirectory "scripts/"

View File

@@ -174,7 +174,6 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
$set = str_replace('enum(', '', $row_table_def['Type']); $set = str_replace('enum(', '', $row_table_def['Type']);
$set = ereg_replace('\\)$', '', $set); $set = ereg_replace('\\)$', '', $set);
$set = explode('\',\'', substr($set, 1, -1)); $set = explode('\',\'', substr($set, 1, -1));
// show dropdown or radio depend on length // show dropdown or radio depend on length
if (strlen($row_table_def['Type']) > 20) { if (strlen($row_table_def['Type']) > 20) {
?> ?>
@@ -207,11 +206,12 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
for ($j = 0; $j < count($set); $j++) { for ($j = 0; $j < count($set); $j++) {
echo ' '; echo ' ';
echo '<input type="radio" name="fields[' . urlencode($field) . ']" '; echo '<input type="radio" name="fields[' . urlencode($field) . ']" ';
echo 'value="' . substr($set[$j], 1, -1) . '"'; //echo 'value="' . substr($set[$j], 1, -1) . '"';
if ($data == substr($set[$j], 1, -1) echo 'value="' . $set[$j] . '"';
if ($data == $set[$j]
|| ($data == '' || ($data == ''
&& isset($row_table_def['Default']) && isset($row_table_def['Default'])
&& substr($set[$j], 1, -1) == $row_table_def['Default'] && $set[$j] == $row_table_def['Default']
&& $row_table_def['Null'] != 'YES')) { && $row_table_def['Null'] != 'YES')) {
// To be able to display a checkmark in the [Null] box when // To be able to display a checkmark in the [Null] box when
// the field is null, we lose the ability to display a // the field is null, we lose the ability to display a
@@ -220,7 +220,7 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
$seenchecked =1; $seenchecked =1;
} }
echo ' />' . "\n"; echo ' />' . "\n";
echo ' ' . htmlspecialchars(substr($set[$j], 1, -1)) . "\n"; echo ' ' . htmlspecialchars($set[$j]) . "\n";
} // end for } // end for
if ($row_table_def['Null'] == 'YES') { if ($row_table_def['Null'] == 'YES') {