Fixed a bug with privileges with escaped wilcards in database names

This commit is contained in:
Loïc Chapeaux
2002-04-13 06:57:31 +00:00
parent c007632e3a
commit 1a4817fb85
2 changed files with 5 additions and 2 deletions

View File

@@ -197,8 +197,8 @@ if ($server > 0) {
while ($row = mysql_fetch_array($rs_usr)) {
if (ereg($re . '%|_', $row['Db'])
|| !mysql_select_db($row['Db'], $userlink) && @mysql_errno() != 1044) {
$row['Db'] = ereg_replace($re . '%', '\\1...', ereg_replace($re . '_', '\\1?', $row['Db']));
$db_to_create = $row['Db'];
$db_to_create = ereg_replace($re . '%', '\\1...', ereg_replace($re . '_', '\\1?', $row['Db']));
$db_to_create = ereg_replace('\\\(%|_)', '\\1', $db_to_create);
$is_create_priv = TRUE;
break;
} // end if