bug 922054 new fix attempt

This commit is contained in:
Marc Delisle
2004-04-06 13:22:20 +00:00
parent 7ac0a4b634
commit c350428b49
2 changed files with 6 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-04-06 Marc Delisle <lem9@users.sourceforge.net>
* main.php, complete the fix for bug 922054
2004-04-04 Marc Delisle <lem9@users.sourceforge.net>
* lang/polish: Updated, thanks to Jakub Wilk (ubanus).
* lang/norwegian: Updated, thanks to Sven-Erik Andersen (sven-erik).

View File

@@ -241,7 +241,9 @@ if ($server > 0) {
$db_to_create = '';
break;
} // end if
else if ( (!PMA_DBI_try_query('USE ' . ereg_replace($re1 .'(%|_)', '\\1\\3', $show_grants_dbname)) && substr(PMA_DBI_getError(), 1, 4) != 1044)
else if ( (ereg($re0 . '%|_', $show_grants_dbname)
&& !ereg('\\\\%|\\\\_', $show_grants_dbname))
|| (!PMA_DBI_try_query('USE ' . ereg_replace($re1 .'(%|_)', '\\1\\3', $show_grants_dbname)) && substr(PMA_DBI_getError(), 1, 4) != 1044)
) {
$db_to_create = ereg_replace($re0 . '%', '\\1...', ereg_replace($re0 . '_', '\\1?', $show_grants_dbname));
$db_to_create = ereg_replace($re1 . '(%|_)', '\\1\\3', $db_to_create);