bug 638275
This commit is contained in:
@@ -8,6 +8,9 @@ $Source$
|
||||
2002-11-16 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/build_dump.lib.php3: fix for old MySQL, thanks to
|
||||
Flavio Poletti (flavio at polettix.it)
|
||||
* tbl_replace.php3: bug 638275: ignore NULL checkbox is there is
|
||||
a value for the field (possible if js is disabled, or broken browser
|
||||
like Konqueror 2.2.2); implemented on insert or update
|
||||
|
||||
2002-11-08 Robin Johnson <robbat2@users.sourceforge.net>
|
||||
* lib/sqlparser.data.php3: Bug #639291 fixed
|
||||
|
@@ -143,7 +143,10 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
|
||||
} // end switch
|
||||
|
||||
// Was the Null checkbox checked for this field?
|
||||
if (isset($fields_null) && isset($fields_null[$encoded_key])) {
|
||||
// (if there is a value, we ignore the Null checkbox: this could
|
||||
// be possible if Javascript is disabled in the browser)
|
||||
if (isset($fields_null) && isset($fields_null[$encoded_key])
|
||||
&& $val=="''") {
|
||||
$val = 'NULL';
|
||||
}
|
||||
|
||||
@@ -165,7 +168,7 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
|
||||
}
|
||||
} // end while
|
||||
|
||||
// Builds the sql upate query
|
||||
// Builds the sql update query
|
||||
$valuelist = ereg_replace(', $', '', $valuelist);
|
||||
if (!empty($valuelist)) {
|
||||
$query = 'UPDATE ' . PMA_backquote($table) . ' SET ' . $valuelist . ' WHERE' . $primary_key
|
||||
@@ -249,7 +252,10 @@ else {
|
||||
} // end switch
|
||||
|
||||
// Was the Null checkbox checked for this field?
|
||||
if (isset($fields_null) && isset($fields_null[$encoded_key])) {
|
||||
// (if there is a value, we ignore the Null checkbox: this could
|
||||
// be possible if Javascript is disabled in the browser)
|
||||
if (isset($fields_null) && isset($fields_null[$encoded_key])
|
||||
&& $val=="''") {
|
||||
$val = 'NULL';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user