The branch, master has been updated via 87794051a44d6d54cdd1ae4be3818cd773b2ec2f (commit) from 79ce179bae4b1b028554df22c16de77f7a73d1f5 (commit)
- Log ----------------------------------------------------------------- commit 87794051a44d6d54cdd1ae4be3818cd773b2ec2f Author: Marc Delisle marc@infomarc.info Date: Mon Mar 15 16:15:23 2010 -0400
bug #2967565 UNHEX not selected by default when inserting BINARY
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 1 + tbl_change.php | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 6d14838..861cc06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2966078 [browse] Incorrect LIMIT is saved and sticks while browsing - bug #2967366 [Structure] Some results of Propose table structure are shown in hex +- bug #2967565 [insert] UNHEX not selected by default when inserting BINARY
3.3.1.0 (not yet released) - bug #2941037 [core] Database structure not sorted by table correctly diff --git a/tbl_change.php b/tbl_change.php index f9ba56b..0c89a17 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -428,6 +428,7 @@ foreach ($rows as $row_id => $vrow) { $real_null_value = FALSE; $special_chars_encoded = ''; if (isset($vrow)) { + // (we are editing) if (is_null($vrow[$field['Field']])) { $real_null_value = TRUE; $vrow[$field['Field']] = ''; @@ -460,6 +461,7 @@ foreach ($rows as $row_id => $vrow) { . $field_name_appendix . '" value="' . htmlspecialchars($vrow[$field['Field']]) . '" />'; } else { + // (we are inserting) // display default values if (!isset($field['Default'])) { $field['Default'] = ''; @@ -475,6 +477,10 @@ foreach ($rows as $row_id => $vrow) { } $backup_field = ''; $special_chars_encoded = PMA_duplicateFirstNewline($special_chars); + // this will select the UNHEX function while inserting + if (($field['is_binary'] || $field['is_blob']) && $_SESSION['tmp_user_values']['display_binary_as_hex'] && $cfg['ShowFunctionFields'] && ! $cfg['ProtectBinary']) { + $field['display_binary_as_hex'] = true; + } }
$idindex = ($o_rows * $fields_cnt) + $i + 1;
hooks/post-receive