Show functions for blobs when upload is enabled (RFE #1191792).

This commit is contained in:
Michal Čihař
2005-10-09 09:47:19 +00:00
parent 7719639cea
commit 058fe96e47
2 changed files with 5 additions and 1 deletions

View File

@@ -443,7 +443,7 @@ foreach ($loop_array AS $vrowcount => $vrow) {
// stored or retrieved" so it does not mean that the contents is
// binary
if ($cfg['ShowFunctionFields']) {
if (($cfg['ProtectBinary'] && $is_blob)
if (($cfg['ProtectBinary'] && $is_blob && !$is_upload)
|| ($cfg['ProtectBinary'] == 'all' && $is_binary)) {
echo ' <td align="center" bgcolor="'. $bgcolor . '">' . $strBinary . '</td>' . "\n";
} else if (strstr($row_table_def['True_Type'], 'enum') || strstr($row_table_def['True_Type'], 'set')) {
@@ -745,9 +745,11 @@ foreach ($loop_array AS $vrowcount => $vrow) {
// (displayed whatever value the ProtectBinary has)
if ($is_upload && $is_blob) {
echo '<br />';
echo '<input type="file" name="fields_upload_' . urlencode($field) . $vkey . '" class="textfield" id="field_' . ($idindex) . '_3" size="10" />&nbsp;';
// find maximum upload size, based on field type
// FIXME: with functions this is not so easy, as you can basically process any data with function like MD5
$max_field_sizes = array(
'tinyblob' => '256',
'blob' => '65536',