From ffbf893536ef48c1bb7ac5a55f3f7f70b688cabd Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Tue, 13 May 2003 09:00:46 +0000 Subject: [PATCH] s/ereg_replace/str_replace/ --- ChangeLog | 2 ++ left.php3 | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41779efe5..d4a13fc67 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * footer.inc.php3, querywindow.php3: Fix bug #736197 (clicking on edit link from a sql-query now switches to sql tab of the query window) + * left.php3: Improved performance by using str_replace instead + of ereg_replace. 2003-05-13 Michal Cihar * left.php3: Fixed displaying of tables with quote in name. diff --git a/left.php3 b/left.php3 index 41f66594b..fedfd05fa 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'], ereg_replace('\'', '\\\'',$table)); + $_table = explode($cfg['LeftFrameTableSeparator'], str_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\'][] = \'' . ereg_replace('\'', '\\\'', $table) . '\';'; - $eval_string .= '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_list_item\'][] = \'' . ereg_replace('\'', '\\\'', $list_item) . '\';'; + $eval_string = '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_name\'][] = \'' . str_replace('\'', '\\\'', $table) . '\';'; + $eval_string .= '$tablestack[\'' . implode('\'][\'', $_table) . '\'][\'pma_list_item\'][] = \'' . str_replace('\'', '\\\'', $list_item) . '\';'; eval($eval_string); } else { $tablestack['__protected__']['pma_name'][] = $table;