From 724e56b334a04c8ff357f94f88077f2066b2ff8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 May 2003 08:44:35 +0000 Subject: [PATCH] Fixed displaying of tables with quote in name. --- ChangeLog | 3 +++ left.php3 | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b31deccac..5a9e1b2c0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-05-13 Michal Cihar + * left.php3: Fixed displaying of tables with quote in name. + 2003-05-12 Garvin Hicking * queryframe.php3: Remove left/bottom margin to better fit the link title in the small frame. diff --git a/left.php3 b/left.php3 index ba7c7164f..41f66594b 100755 --- a/left.php3 +++ b/left.php3 @@ -465,7 +465,7 @@ if ($num_dbs > 1) { // garvin: Check whether to display nested sets if (!empty($cfg['LeftFrameTableSeparator'])) { - $_table = explode($cfg['LeftFrameTableSeparator'], $table); + $_table = explode($cfg['LeftFrameTableSeparator'], ereg_replace('\'', '\\\'',$table)); if (is_array($_table)) { reset($_table); while(list($key, $val) = each($_table)) { @@ -477,8 +477,8 @@ if ($num_dbs > 1) { unset($_table[count($_table)-1]); $_table = PMA_reduceNest($_table); - $eval_string = '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_name\'][] = \'' . $table . '\';'; - $eval_string .= '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_list_item\'][] = \'' . $list_item . '\';'; + $eval_string = '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_name\'][] = \'' . ereg_replace('\'', '\\\'', $table) . '\';'; + $eval_string .= '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_list_item\'][] = \'' . ereg_replace('\'', '\\\'', $list_item) . '\';'; eval($eval_string); } else { $tablestack['__protected__']['pma_name'][] = $table;