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

@@ -14,6 +14,8 @@ $Source$
* server_privileges.php: Limit username and hostname to actual limits of * server_privileges.php: Limit username and hostname to actual limits of
MySQL (RFE #1178071). MySQL (RFE #1178071).
* config.default.php: Add COMPRESS and UNCOMPRESS functions. * config.default.php: Add COMPRESS and UNCOMPRESS functions.
* tbl_change.php: Show functions for blobs when upload is enabled (RFE
#1191792).
2005-10-08 Marc Delisle <lem9@users.sourceforge.net> 2005-10-08 Marc Delisle <lem9@users.sourceforge.net>
* libraries/session.inc.php: workaround for warnings on session_start() * libraries/session.inc.php: workaround for warnings on session_start()

View File

@@ -443,7 +443,7 @@ foreach ($loop_array AS $vrowcount => $vrow) {
// stored or retrieved" so it does not mean that the contents is // stored or retrieved" so it does not mean that the contents is
// binary // binary
if ($cfg['ShowFunctionFields']) { if ($cfg['ShowFunctionFields']) {
if (($cfg['ProtectBinary'] && $is_blob) if (($cfg['ProtectBinary'] && $is_blob && !$is_upload)
|| ($cfg['ProtectBinary'] == 'all' && $is_binary)) { || ($cfg['ProtectBinary'] == 'all' && $is_binary)) {
echo ' <td align="center" bgcolor="'. $bgcolor . '">' . $strBinary . '</td>' . "\n"; 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')) { } 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) // (displayed whatever value the ProtectBinary has)
if ($is_upload && $is_blob) { 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;'; 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 // 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( $max_field_sizes = array(
'tinyblob' => '256', 'tinyblob' => '256',
'blob' => '65536', 'blob' => '65536',