mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Change simple preg_match to ereg
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@812 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -40,7 +40,7 @@ if (isset($_GET["host"]) && ($result = $dbh->query("SHOW GRANTS FOR " . $dbh->qu
|
||||
if (preg_match('~GRANT (.*) ON (.*) TO ~', $row[0], $match) && preg_match_all('~ *([^(,]*[^ ,(])( *\\([^)]+\\))?~', $match[1], $matches, PREG_SET_ORDER)) { //! escape the part between ON and TO
|
||||
foreach ($matches as $val) {
|
||||
$grants["$match[2]$val[2]"][$val[1]] = true;
|
||||
if (preg_match('~ WITH GRANT OPTION~', $row[0])) { //! don't check inside strings and identifiers
|
||||
if (ereg(' WITH GRANT OPTION', $row[0])) { //! don't check inside strings and identifiers
|
||||
$grants["$match[2]$val[2]"]["GRANT OPTION"] = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user