From 26021f05f830d91ba24a68045a572e109225a9e1 Mon Sep 17 00:00:00 2001 From: shamika Date: Sun, 24 Feb 2013 13:02:14 +0530 Subject: [PATCH 1/5] Bug Fix:#3813 grid editing utf8 set/enum value --- libraries/Util.class.php | 2 +- sql.php | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 5155564a31..7f1d276928 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -4036,7 +4036,7 @@ class PMA_Util */ public static function parseEnumSetValues($definition) { - $values_string = htmlentities($definition); + $values_string = htmlentities($definition,ENT_COMPAT, "UTF-8"); // There is a JS port of the below parser in functions.js // If you are fixing something here, // you need to also update the JS port. diff --git a/sql.php b/sql.php index ac1114351e..1a4d584f63 100644 --- a/sql.php +++ b/sql.php @@ -222,12 +222,25 @@ if (isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) { $values = PMA_Util::parseEnumSetValues($field_info_result[0]['Type']); $select = ''; - foreach ($values as $value) { - $select .= ''; } $select_size = (sizeof($values) > 10) ? 10 : sizeof($values); From 071e3ad50a699c122891103d01d8a6db4811a481 Mon Sep 17 00:00:00 2001 From: shamika Date: Sun, 24 Feb 2013 20:45:53 +0530 Subject: [PATCH 2/5] Bug Fix:#3813 grid editing utf8 set/enum value-resubmit with correcing errors --- sql.php | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/sql.php b/sql.php index 1a4d584f63..3434c1421c 100644 --- a/sql.php +++ b/sql.php @@ -223,25 +223,21 @@ if (isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) { $select = ''; -// foreach ($values as $value) { -// $select .= ''; } $select_size = (sizeof($values) > 10) ? 10 : sizeof($values); From 4df529c9c9c5eaec4b84151fd7881b7923a699d9 Mon Sep 17 00:00:00 2001 From: shamika Date: Thu, 28 Feb 2013 09:12:07 +0530 Subject: [PATCH 4/5] remove the patch file --- patch.diff | 116 ----------------------------------------------------- 1 file changed, 116 deletions(-) delete mode 100644 patch.diff diff --git a/patch.diff b/patch.diff deleted file mode 100644 index 0f844f046e..0000000000 --- a/patch.diff +++ /dev/null @@ -1,116 +0,0 @@ -From 26021f05f830d91ba24a68045a572e109225a9e1 Mon Sep 17 00:00:00 2001 -From: shamika -Date: Sun, 24 Feb 2013 13:02:14 +0530 -Subject: [PATCH 1/2] Bug Fix:#3813 grid editing utf8 set/enum value - ---- - libraries/Util.class.php | 2 +- - sql.php | 23 ++++++++++++++++++----- - 2 files changed, 19 insertions(+), 6 deletions(-) - -diff --git a/libraries/Util.class.php b/libraries/Util.class.php -index 5155564..7f1d276 100644 ---- a/libraries/Util.class.php -+++ b/libraries/Util.class.php -@@ -4036,7 +4036,7 @@ class PMA_Util - */ - public static function parseEnumSetValues($definition) - { -- $values_string = htmlentities($definition); -+ $values_string = htmlentities($definition,ENT_COMPAT, "UTF-8"); - // There is a JS port of the below parser in functions.js - // If you are fixing something here, - // you need to also update the JS port. -diff --git a/sql.php b/sql.php -index ac11143..1a4d584 100644 ---- a/sql.php -+++ b/sql.php -@@ -222,12 +222,25 @@ if (isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) { - $values = PMA_Util::parseEnumSetValues($field_info_result[0]['Type']); - - $select = ''; -- foreach ($values as $value) { -- $select .= ''; - } - - $select_size = (sizeof($values) > 10) ? 10 : sizeof($values); --- -1.7.11.msysgit.1 - - -From 071e3ad50a699c122891103d01d8a6db4811a481 Mon Sep 17 00:00:00 2001 -From: shamika -Date: Sun, 24 Feb 2013 20:45:53 +0530 -Subject: [PATCH 2/2] Bug Fix:#3813 grid editing utf8 set/enum value-resubmit - with correcing errors - ---- - sql.php | 26 +++++++++++--------------- - 1 file changed, 11 insertions(+), 15 deletions(-) - -diff --git a/sql.php b/sql.php -index 1a4d584..3434c14 100644 ---- a/sql.php -+++ b/sql.php -@@ -223,25 +223,21 @@ if (isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) { - - $select = ''; - --// foreach ($values as $value) { --// $select .= ''; -+ } - - $select_size = (sizeof($values) > 10) ? 10 : sizeof($values); - $select = '