When ENUM field has just one value, it could not be set to NULL (bug #783533).
This commit is contained in:
@@ -21,6 +21,8 @@ $Source$
|
||||
* header.inc.php3: Don't allow including this file twice.
|
||||
* db_details.php3, db_details_importdocsql.php3, export.php3,
|
||||
tbl_move_copy.php3, tbl_rename.php3: Added some html quoting.
|
||||
* libraries/tbl_change.js: When ENUM field has just one value, it could
|
||||
not be set to NULL (bug #783533).
|
||||
|
||||
2003-08-05 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/sqlparser.data.php3: bug 779453, wrong count
|
||||
|
@@ -26,10 +26,16 @@ function nullify(theType, urlField, md5Field)
|
||||
// Other "ENUM" field
|
||||
else if (theType == 2) {
|
||||
var elts = rowForm.elements['field_' + md5Field + '[]'];
|
||||
var elts_cnt = elts.length;
|
||||
for (var i = 0; i < elts_cnt; i++ ) {
|
||||
elts[i].checked = false;
|
||||
} // end for
|
||||
// when there is just one option in ENUM:
|
||||
if (elts.checked) {
|
||||
elts.checked = false;
|
||||
} else {
|
||||
var elts_cnt = elts.length;
|
||||
for (var i = 0; i < elts_cnt; i++ ) {
|
||||
elts[i].checked = false;
|
||||
} // end for
|
||||
|
||||
} // end if
|
||||
}
|
||||
// Other field types
|
||||
else /*if (theType == 5)*/ {
|
||||
|
Reference in New Issue
Block a user