From 9dff46d0acc538ad1d2eaf5365409beae8fade51 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Thu, 17 Apr 2003 11:39:01 +0000 Subject: [PATCH] Use $encoded_key for blob upload comparison to detect changes in BLOB fields with special names. --- ChangeLog | 4 ++++ tbl_replace_fields.php3 | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index af50a60493..83ccfea3f4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-04-17 Garvin Hicking + * tbl_replace_fields.php3: Use $encoded_key instead of $key to + detect changes in BLOB fields with a special name. + 2003-04-16 Garvin Hicking * tbl_query_box.php3: Only hide 'go' SQL button, when in files mode with no $db set diff --git a/tbl_replace_fields.php3 b/tbl_replace_fields.php3 index b4b6a6e7e9..3855b85e0b 100755 --- a/tbl_replace_fields.php3 +++ b/tbl_replace_fields.php3 @@ -19,13 +19,13 @@ // binary file is uploaded, thus bypassing further manipulation of $val. $check_stop = false; -if (isset(${"fields_upload_" . $key}) && ${"fields_upload_" . $key} != 'none'){ +if (isset(${"fields_upload_" . $encoded_key}) && ${"fields_upload_" . $encoded_key} != 'none'){ // garvin: This fields content is a blob-file upload. - if (!empty(${"fields_upload_" . $key})) { + if (!empty(${"fields_upload_" . $encoded_key})) { // garvin: The blob-field is not empty. Check what we have there. - $data_file = ${"fields_upload_" . $key}; + $data_file = ${"fields_upload_" . $encoded_key}; if (is_uploaded_file($data_file)) { // garvin: A valid uploaded file is found. Look into the file... @@ -49,8 +49,8 @@ if (isset(${"fields_upload_" . $key}) && ${"fields_upload_" . $key} != 'none'){ // void } - } elseif (!empty(${'fields_uploadlocal_' . $key})) { - $file_to_upload = $cfg['UploadDir'] . eregi_replace('\.\.*', '.', ${'fields_uploadlocal_' . $key}); + } elseif (!empty(${'fields_uploadlocal_' . $encoded_key})) { + $file_to_upload = $cfg['UploadDir'] . eregi_replace('\.\.*', '.', ${'fields_uploadlocal_' . $encoded_key}); // A local file will be uploaded. $open_basedir = ''; @@ -108,7 +108,7 @@ if (isset(${"fields_upload_" . $key}) && ${"fields_upload_" . $key} != 'none'){ if (!$check_stop) { // f i e l d v a l u e i n t h e f o r m - if (isset($fields_type[$key])) $type = $fields_type[$key]; + if (isset($fields_type[$encoded_key])) $type = $fields_type[$encoded_key]; else $type = ''; switch (strtolower($val)) { case 'null': -- 2.11.4.GIT