s/ereg_replace/str_replace/

This commit is contained in:
Garvin Hicking
2003-05-13 09:00:46 +00:00
parent 65e4406c69
commit ffbf893536
2 changed files with 5 additions and 3 deletions

View File

@@ -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 <nijel@users.sourceforge.net>
* left.php3: Fixed displaying of tables with quote in name.

View File

@@ -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;