Databases are server specific

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@155 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-13 07:03:42 +00:00
parent 50b85f04eb
commit e0cce46ede
4 changed files with 7 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ if ($_POST && !$error) {
}
} elseif ($_GET["db"] !== $_POST["name"]) {
if ($mysql->query("CREATE DATABASE " . idf_escape($_POST["name"]) . ($_POST["collation"] ? " COLLATE '" . $mysql->escape_string($_POST["collation"]) . "'" : ""))) {
unset($_SESSION["databases"]);
unset($_SESSION[$_GET["server"]]["databases"]);
if (!strlen($_GET["db"])) {
redirect(preg_replace('~db=[^&]*&~', '', $SELF) . "db=" . urlencode($_POST["name"]), lang('Database has been created.'));
}