bug #3469254 [edit] Setting data to NULL and drop-downs

This commit is contained in:
Marc Delisle
2012-01-21 06:56:16 -05:00
parent 5d1fa1cc6b
commit 346c70d6fd
2 changed files with 10 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog
- bug #3049209 [import] Import from ODS ignores cell that is the same as cell before - bug #3049209 [import] Import from ODS ignores cell that is the same as cell before
- bug #3463933 [display] SELECT DISTINCT displays wrong total records found - bug #3463933 [display] SELECT DISTINCT displays wrong total records found
- patch #3458944 [operations] copy table data missing SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO' - patch #3458944 [operations] copy table data missing SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'
- bug #3469254 [edit] Setting data to NULL and drop-downs
3.4.9.0 (2011-12-21) 3.4.9.0 (2011-12-21)
- bug #3442028 [edit] Inline editing enum fields with null shows no dropdown - bug #3442028 [edit] Inline editing enum fields with null shows no dropdown

View File

@@ -218,6 +218,15 @@ foreach ($loop_array as $rownumber => $where_clause) {
if ($is_insert && $using_key && isset($me_fields_type) && is_array($me_fields_type) && isset($where_clause)) { if ($is_insert && $using_key && isset($me_fields_type) && is_array($me_fields_type) && isset($where_clause)) {
$prot_row = PMA_DBI_fetch_single_row('SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';'); $prot_row = PMA_DBI_fetch_single_row('SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';');
} }
// When a select field is nullified, it's not present in $_REQUEST
// so initialize it; this way, the foreach($me_fields) will process it
foreach ($me_fields_name as $key => $val) {
if (! isset($me_fields[$key])) {
$me_fields[$key] = '';
}
}
foreach ($me_fields as $key => $val) { foreach ($me_fields as $key => $val) {
// Note: $key is an md5 of the fieldname. The actual fieldname is available in $me_fields_name[$key] // Note: $key is an md5 of the fieldname. The actual fieldname is available in $me_fields_name[$key]