diff --git a/ChangeLog b/ChangeLog index 22f1598db..37ffe194f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ $Source$ * lang/*: Remove duplicite message. * lang/sync_lang.sh: Sync japanese also, it works now (at least for me). * lang/japanese: Update, thanks to Tadashi Jokagi - elf2000. + * libraries/display_tbl.lib.php: Do not break on special chars in column + name (bug #1180668). 2005-10-29 Michal Čihař * Documentation.html, config.default.php, libraries/common.lib.php: Link diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 01eddae17..627bdda1e 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -752,7 +752,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // FROM `PMA_relation` AS `1` , `PMA_relation` AS `2` if (($is_join - && !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . $fields_meta[$i]->name . '~i', $select_expr, $parts = array())) + && !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . strtr($fields_meta[$i]->name, array('[' => '\\[', '~' => '\\~', '\\' => '\\\\')) . '~i', $select_expr, $parts = array())) || ( isset($analyzed_sql[0]['select_expr'][$i]['expr']) && isset($analyzed_sql[0]['select_expr'][$i]['column']) && $analyzed_sql[0]['select_expr'][$i]['expr'] !=