diff --git a/tbl_replace.php b/tbl_replace.php index 5b4d23398..d58560ac4 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -86,11 +86,11 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) { $valuelist = ''; // Map multi-edit keys to single-level arrays, dependent on how we got the fields - $me_fields = (isset($fields['multi_edit']) ? $fields['multi_edit'][$enc_primary_key] : isset($fields) ? $fields : null); - $me_fields_prev = (isset($fields_prev['multi_edit']) ? $fields_prev['multi_edit'][$enc_primary_key] : isset($fields_prev) ? $fields_prev : null); - $me_funcs = (isset($funcs['multi_edit']) ? $funcs['multi_edit'][$enc_primary_key] : isset($funcs) ? $funcs : null); - $me_fields_type = (isset($fields_type['multi_edit']) ? $fields_type['multi_edit'][$enc_primary_key] : isset($fields_type) ? $fields_type : null); - $me_fields_null = (isset($fields_null['multi_edit']) ? $fields_null['multi_edit'][$enc_primary_key] : isset($fields_null) ? $fields_null : null); + $me_fields = (isset($fields['multi_edit']) ? $fields['multi_edit'][$enc_primary_key] : (isset($fields) ? $fields : null)); + $me_fields_prev = (isset($fields_prev['multi_edit']) ? $fields_prev['multi_edit'][$enc_primary_key] : (isset($fields_prev) ? $fields_prev : null)); + $me_funcs = (isset($funcs['multi_edit']) ? $funcs['multi_edit'][$enc_primary_key] : (isset($funcs) ? $funcs : null)); + $me_fields_type = (isset($fields_type['multi_edit']) ? $fields_type['multi_edit'][$enc_primary_key] : (isset($fields_type) ? $fields_type : null)); + $me_fields_null = (isset($fields_null['multi_edit']) ? $fields_null['multi_edit'][$enc_primary_key] : (isset($fields_null) ? $fields_null : null)); foreach($me_fields AS $key => $val) { $encoded_key = $key; @@ -153,11 +153,11 @@ else { $fieldlist = ''; $valuelist = ''; - $me_fields = (isset($fields['multi_edit']) ? $fields['multi_edit'][$enc_primary_key] : isset($fields) ? $fields : null); - $me_fields_prev = (isset($fields_prev['multi_edit']) ? $fields_prev['multi_edit'][$enc_primary_key] : isset($fields_prev) ? $fields_prev : null); - $me_funcs = (isset($funcs['multi_edit']) ? $funcs['multi_edit'][$enc_primary_key] : isset($funcs) ? $funcs : null); - $me_fields_type = (isset($fields_type['multi_edit']) ? $fields_type['multi_edit'][$enc_primary_key] : isset($fields_type) ? $fields_type : null); - $me_fields_null = (isset($fields_null['multi_edit']) ? $fields_null['multi_edit'][$enc_primary_key] : isset($fields_null) ? $fields_null : null); + $me_fields = (isset($fields['multi_edit']) ? $fields['multi_edit'][$enc_primary_key] : (isset($fields) ? $fields : null)); + $me_fields_prev = (isset($fields_prev['multi_edit']) ? $fields_prev['multi_edit'][$enc_primary_key] : (isset($fields_prev) ? $fields_prev : null)); + $me_funcs = (isset($funcs['multi_edit']) ? $funcs['multi_edit'][$enc_primary_key] : (isset($funcs) ? $funcs : null)); + $me_fields_type = (isset($fields_type['multi_edit']) ? $fields_type['multi_edit'][$enc_primary_key] : (isset($fields_type) ? $fields_type : null)); + $me_fields_null = (isset($fields_null['multi_edit']) ? $fields_null['multi_edit'][$enc_primary_key] : (isset($fields_null) ? $fields_null : null)); // garvin: Get, if sent, any protected fields to insert them here: if (isset($me_fields_type) && is_array($me_fields_type) && isset($enc_primary_key)) { diff --git a/tbl_replace_fields.php b/tbl_replace_fields.php index 919c5b418..febd8f2af 100644 --- a/tbl_replace_fields.php +++ b/tbl_replace_fields.php @@ -28,8 +28,8 @@ PMA_checkParameters(array('db','encoded_key')); $check_stop = false; // Check if a multi-edit row was found -${'me_fields_upload_' . $encoded_key} = (isset($enc_primary_key) && isset(${'fields_upload_' . $encoded_key}['multi_edit']) ? ${'fields_upload_' . $encoded_key}['multi_edit'][$enc_primary_key] : isset(${'fields_upload_' . $encoded_key}) ? ${'fields_upload_' . $encoded_key} : null); -${'me_fields_uploadlocal_' . $encoded_key} = (isset($enc_primary_key) && isset(${'fields_uploadlocal_' . $encoded_key}['multi_edit']) ? ${'fields_uploadlocal_' . $encoded_key}['multi_edit'][$enc_primary_key] : isset(${'fields_uploadlocal_' . $encoded_key}) ? ${'fields_uploadlocal_' . $encoded_key} : null); +${'me_fields_upload_' . $encoded_key} = (isset($enc_primary_key) && isset(${'fields_upload_' . $encoded_key}['multi_edit']) ? ${'fields_upload_' . $encoded_key}['multi_edit'][$enc_primary_key] : (isset(${'fields_upload_' . $encoded_key}) ? ${'fields_upload_' . $encoded_key} : null)); +${'me_fields_uploadlocal_' . $encoded_key} = (isset($enc_primary_key) && isset(${'fields_uploadlocal_' . $encoded_key}['multi_edit']) ? ${'fields_uploadlocal_' . $encoded_key}['multi_edit'][$enc_primary_key] : (isset(${'fields_uploadlocal_' . $encoded_key}) ? ${'fields_uploadlocal_' . $encoded_key} : null)); if (isset(${'me_fields_upload_' . $encoded_key}) && ${'me_fields_upload_' . $encoded_key} != 'none'){ // garvin: This fields content is a blob-file upload.