From a66b1cc6b31d77ecf169104852668a0ad3ac4fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 Nov 2003 12:42:38 +0000 Subject: [PATCH] Use preg again, it just needs a bit more escaping of \ (once for PHP and once for PCRE). --- ChangeLog | 4 ++++ libraries/common.lib.php | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c85547b39..8ab82c6b4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-11-24 Michal Cihar + * libraries/common.lib.php: Use preg again, it just needs a bit more + escaping of \ (once for PHP and once for PCRE). + 2003-11-23 Alexander M. Turek * server_privileges.php3: while (list() = each()) is not always as bad as one might think ;-p diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 8a5b72fa2..3051f4c89 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1104,9 +1104,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} // We don't want more than one asterisk inside our 'only_db'. continue; } - - //if ($is_show_dbs && preg_match('@(^|[^\])(_|%)@', $dblist[$i])) { - if ($is_show_dbs && ereg('(^|[^\])(_|%)', $dblist[$i])) { + if ($is_show_dbs && preg_match('@(^|[^\\\\])(_|%)@', $dblist[$i])) { $local_query = 'SHOW DATABASES LIKE \'' . $dblist[$i] . '\''; $rs = PMA_mysql_query($local_query, $dbh); // "SHOW DATABASES" statement is disabled