remove the patch file
This commit is contained in:
parent
5b01f2977a
commit
4df529c9c9
116
patch.diff
116
patch.diff
@ -1,116 +0,0 @@
|
||||
From 26021f05f830d91ba24a68045a572e109225a9e1 Mon Sep 17 00:00:00 2001
|
||||
From: shamika <shamikadineshdha@gmail.com>
|
||||
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 .= '<option value="' . $value . '"';
|
||||
- if (in_array($value, $selected_values, true)) {
|
||||
- $select .= ' selected="selected"';
|
||||
+
|
||||
+// foreach ($values as $value) {
|
||||
+// $select .= '<option value="' . $value . '"';
|
||||
+// if (in_array($value, $selected_values, true)) {
|
||||
+// $select .= ' selected="selected"';
|
||||
+// }
|
||||
+// $select .= '>' . $value . '</option>';
|
||||
+// }
|
||||
+
|
||||
+ //converts characters of $_REQUEST['curr_value'] to HTML entities
|
||||
+ $converted_curr_value=htmlentities($_REQUEST['curr_value'],ENT_COMPAT, "UTF-8");
|
||||
+
|
||||
+ foreach ($values as $value) {
|
||||
+
|
||||
+ $select .= '<option value="' . $value . '" ';
|
||||
+ if ( $value == $converted_curr_value) {
|
||||
+ $select .= 'selected';
|
||||
}
|
||||
- $select .= '>' . $value . '</option>';
|
||||
+ $select .= ' >' . $value. '</option>';
|
||||
}
|
||||
|
||||
$select_size = (sizeof($values) > 10) ? 10 : sizeof($values);
|
||||
--
|
||||
1.7.11.msysgit.1
|
||||
|
||||
|
||||
From 071e3ad50a699c122891103d01d8a6db4811a481 Mon Sep 17 00:00:00 2001
|
||||
From: shamika <shamikadineshdha@gmail.com>
|
||||
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 .= '<option value="' . $value . '"';
|
||||
-// if (in_array($value, $selected_values, true)) {
|
||||
-// $select .= ' selected="selected"';
|
||||
-// }
|
||||
-// $select .= '>' . $value . '</option>';
|
||||
-// }
|
||||
-
|
||||
- //converts characters of $_REQUEST['curr_value'] to HTML entities
|
||||
+ //converts characters of $_REQUEST['curr_value'] to HTML entities
|
||||
$converted_curr_value=htmlentities($_REQUEST['curr_value'],ENT_COMPAT, "UTF-8");
|
||||
|
||||
+ //To prevent from, omiting current selected value.
|
||||
+ if ( ! in_array($converted_curr_value, $values, TRUE)) {
|
||||
+ $values[] = $converted_curr_value;
|
||||
+ }
|
||||
+
|
||||
foreach ($values as $value) {
|
||||
-
|
||||
- $select .= '<option value="' . $value . '" ';
|
||||
- if ( $value == $converted_curr_value) {
|
||||
- $select .= 'selected';
|
||||
+ $select .= '<option value="' . $value . '"';
|
||||
+ if ($value == $converted_curr_value) {
|
||||
+ $select .= ' selected ';
|
||||
}
|
||||
- $select .= ' >' . $value. '</option>';
|
||||
- }
|
||||
+ $select .= '>' . $value. '</option>';
|
||||
+ }
|
||||
|
||||
$select_size = (sizeof($values) > 10) ? 10 : sizeof($values);
|
||||
$select = '<select multiple="multiple" size="' . $select_size . '">'
|
||||
--
|
||||
1.7.11.msysgit.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user