removed checkbox for binary uploads

This commit is contained in:
Michal Čihař
2003-02-17 09:35:16 +00:00
parent c8136a3760
commit 7e5f426135
3 changed files with 11 additions and 20 deletions

View File

@@ -10,18 +10,11 @@
if (isset(${"fields_upload_" . $key}) && !empty(${"fields_upload_" . $key}) && ${"fields_upload_" . $key} != 'none') {
$data_file = ${"fields_upload_" . $key};
$val = fread(fopen($data_file, "rb"), filesize($data_file));
if (isset(${"fields_upload_binary_" . $key})) {
// nijel: This is probably the best way how to put binary data
// into MySQL and it also allow not to care about charset
// conversion that would otherwise corrupt the data.
$val = '0x' . bin2hex($val);
$seen_binary = TRUE;
} else {
// must always add slashes for an uploaded file:
// - do not use PMA_sqlAddslashes()
// - do not check get_magic_quotes_gpc()
$val = "'" . addslashes($val) . "'";
}
// nijel: This is probably the best way how to put binary data
// into MySQL and it also allow not to care about charset
// conversion that would otherwise corrupt the data.
$val = '0x' . bin2hex($val);
$seen_binary = TRUE;
} else {
// f i e l d v a l u e i n t h e f o r m