From 520872da7437b99ec6d685892eed0cb80417abe5 Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Sat, 26 Apr 2014 23:01:16 +0200 Subject: [PATCH 1/2] Fix 'phpmyadmin refuses to show tables with enums containing special data' bug #4380 Signed-off-by: Hugues Peccatte Conflicts: ChangeLog --- ChangeLog | 1 + libraries/Util.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ec1b284aa3..779e2d973f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,7 @@ phpMyAdmin - ChangeLog - bug #4375 Group two DB, one's name is the prefix of the other one - bug #4070 Confusing database/table grouping - bug #4366 Creating Index doesn't update index-list +- bug #4080 phpmyadmin refuses to show tables with enums containing special data 4.1.14.0 (2014-04-26) - bug #4365 Creating bookmark with multiple queries not working diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 72bcb6ad86..1cd5216c30 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -3028,7 +3028,7 @@ class PMA_Util $displayed_type = htmlspecialchars($printtype); if (strlen($printtype) > $GLOBALS['cfg']['LimitChars']) { $displayed_type = ''; - $displayed_type .= substr($printtype, 0, $GLOBALS['cfg']['LimitChars']); + $displayed_type .= mb_substr($printtype, 0, $GLOBALS['cfg']['LimitChars']); $displayed_type .= ''; } From 6fb15d8a416c179134832c41fdc7d0cbe668c05c Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Sun, 27 Apr 2014 09:33:52 +0200 Subject: [PATCH 2/2] Use PMA_String class to substr multi-bytes. Signed-off-by: Hugues Peccatte --- libraries/Util.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 1cd5216c30..962b1e7cda 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -3028,7 +3028,9 @@ class PMA_Util $displayed_type = htmlspecialchars($printtype); if (strlen($printtype) > $GLOBALS['cfg']['LimitChars']) { $displayed_type = ''; - $displayed_type .= mb_substr($printtype, 0, $GLOBALS['cfg']['LimitChars']); + $displayed_type .= $GLOBALS['PMA_String']->substr( + $printtype, 0, $GLOBALS['cfg']['LimitChars'] + ); $displayed_type .= ''; }