mirror of
https://github.com/vrana/adminer.git
synced 2025-12-29 03:40:35 +01:00
Improve session restarting
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1227 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP changes add.x to add_x
|
||||
if (DB !== $_POST["name"]) {
|
||||
// create or rename database
|
||||
restart_session();
|
||||
unset($_SESSION["databases"][$_GET["server"]]); // clear cache
|
||||
$dbs = explode("\n", str_replace("\r", "", $_POST["name"]));
|
||||
$failed = false;
|
||||
@@ -15,6 +16,7 @@ if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP c
|
||||
}
|
||||
}
|
||||
if (query_redirect(queries(), ME . "db=" . urlencode($last), lang('Database has been created.'), !strlen(DB), false, $failed)) {
|
||||
//! move triggers
|
||||
$result = $connection->query("SHOW TABLES");
|
||||
while ($row = $result->fetch_row()) {
|
||||
if (!queries("RENAME TABLE " . idf_escape($row[0]) . " TO " . idf_escape($_POST["name"]) . "." . idf_escape($row[0]))) {
|
||||
|
||||
Reference in New Issue
Block a user