removed checkbox for binary uploads
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-02-16 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* tbl_change.php3, tbl_replace_fields.php3: Removed checkbox for binary
|
||||
upload, upload field moved into table.
|
||||
|
||||
2003-02-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
### 2.4.0-rc2 released
|
||||
|
||||
|
@@ -533,7 +533,6 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
echo "\n";
|
||||
?>
|
||||
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$protected$" />
|
||||
</td>
|
||||
<?php
|
||||
} else if ($is_blob) {
|
||||
echo "\n";
|
||||
@@ -542,7 +541,6 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
<?php echo $backup_field . "\n"; ?>
|
||||
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['TextareaRows']; ?>" cols="<?php echo $cfg['TextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_3"
|
||||
<?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" ><?php echo $special_chars; ?></textarea>
|
||||
</td>
|
||||
<?php
|
||||
|
||||
} else {
|
||||
@@ -557,7 +555,6 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php echo $backup_field . "\n"; ?>
|
||||
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_3" />
|
||||
</td>
|
||||
<?php
|
||||
} // end if...elseif...else
|
||||
|
||||
@@ -566,12 +563,9 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
// (displayed whatever value the ProtectBinary has)
|
||||
|
||||
if ($is_upload && $is_blob) {
|
||||
echo '<td><input type="file" name="fields_upload_' . urlencode($field) . '" class="textfield" id="field_' . $i . '_3" />';
|
||||
echo '<input type="checkbox" checked="checked" name="fields_upload_binary_' . urlencode($field) . '" id="field_' . $i . '_4" />';
|
||||
echo '<label for="fields_upload_binary_' . urlencode($field) . '">' . $strBinary . '</label>';
|
||||
echo '<a href="Documentation.html#binary_upload" target="documentation">(' . $strDocu . ')</a>';
|
||||
echo '</td>';
|
||||
echo '<input type="file" name="fields_upload_' . urlencode($field) . '" class="textfield" id="field_' . $i . '_3" />';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
} // end else if ( binary or blob)
|
||||
else {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user