[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_3, updated. RELEASE_3_3_1RC1-57-gf0672d8

Marc Delisle lem9 at users.sourceforge.net
Mon Mar 15 21:17:14 CET 2010


The branch, QA_3_3 has been updated
       via  f0672d82c38af1593523e2271f4cadcd27e64e39 (commit)
      from  7a366c3f088cc060b769d56378605c6473b185e8 (commit)


- Log -----------------------------------------------------------------
commit f0672d82c38af1593523e2271f4cadcd27e64e39
Author: Marc Delisle <marc at infomarc.info>
Date:   Mon Mar 15 16:08:56 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 9514bd8..1594d49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,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 c2fb93a..f8cc1c0 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -429,6 +429,7 @@ foreach ($rows as $row_id => $vrow) {
         $real_null_value = FALSE;
         $special_chars_encoded = '';
         if (isset($vrow)) {
+            // (we are editing)
             // On a BLOB that can have a NULL value, the is_null() returns
             // true if it has no content but for me this is different than
             // having been set explicitely to NULL so I put an exception here
@@ -464,6 +465,7 @@ foreach ($rows as $row_id => $vrow) {
                 . $field_name_appendix . '" value="'
                 . htmlspecialchars($vrow[$field['Field']]) . '" />';
         } else {
+            // (we are inserting)
             // loic1: display default values
             if (!isset($field['Default'])) {
                 $field['Default'] = '';
@@ -479,6 +481,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']) {
+                $field['display_binary_as_hex'] = true;
+            }
         }
 
         $idindex  = ($o_rows * $fields_cnt) + $i + 1;


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list