This commit is contained in:
Marc Delisle
2001-05-23 18:21:45 +00:00
parent 279662b658
commit 4b6bfcd1a4
2 changed files with 53 additions and 25 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2001-05-22 Marc Delisle <lem9@users.sourceforge.net>
* Bug #424237: cannot set an enum field to Null
2001-05-21 Marc Delisle <lem9@users.sourceforge.net> 2001-05-21 Marc Delisle <lem9@users.sourceforge.net>
* add a message $strTextAreaLength to tell users when a textarea * add a message $strTextAreaLength to tell users when a textarea
contents is too large to be editable ( > 32K) contents is too large to be editable ( > 32K)

View File

@@ -101,22 +101,47 @@ 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 '<option value="'.substr($set[$j], 1, -1).'"'; echo '<option value="'.substr($set[$j], 1, -1).'"';
if($data == substr($set[$j], 1, -1) || ($data == "" && substr($set[$j], 1, -1) == $row_table_def["Default"])) if ($data == substr($set[$j], 1, -1)
|| ( $data == ""
&& substr($set[$j], 1, -1) == $row_table_def["Default"]))
echo " selected"; echo " selected";
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n"; echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n";
} }
echo "</select></td>"; echo "</select></td>";
} }
else { else {
echo "<td>\n"; echo "<td>\n";
$seenchecked = 0;
for($j=0; $j<count($set);$j++) for($j=0; $j<count($set);$j++)
{ {
echo "<input type=radio name=fields[$field] "; echo "<input type=radio name=fields[$field] ";
echo 'value="'.substr($set[$j], 1, -1).'"'; echo 'value="'.substr($set[$j], 1, -1).'"';
if($data == substr($set[$j], 1, -1) || ($data == "" && substr($set[$j], 1, -1) == $row_table_def["Default"])) if ($data == substr($set[$j], 1, -1)
|| ( $data == ""
&& substr($set[$j], 1, -1) == $row_table_def["Default"]
&& $row_table_def["Null"] != "YES"))
// To be able to display a checkmark in the [Null] box when the field
// is null, we lose the ability to display a checkmark besides the default value
{
echo " checked"; echo " checked";
$seenchecked=1;
}
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n"; echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n";
} }
if ($row_table_def["Null"] == "YES") {
echo "<input type=\"radio\"
name=fields[$field]
value=\"null\"";
if ($seenchecked==0)
echo " checked";
echo ">[$strNull]";
}
echo "</td>"; echo "</td>";
} }