Do not break on special chars in column name (bug #1180668).

This commit is contained in:
Michal Čihař
2005-10-30 17:24:43 +00:00
parent 54870b1e44
commit bc9b7aa8b3
2 changed files with 3 additions and 1 deletions

View File

@@ -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ř <michal@cihar.com>
* Documentation.html, config.default.php, libraries/common.lib.php: Link

View File

@@ -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'] !=