Add manually set database to session
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@513 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
d06a9ada4c
commit
c49331e594
|
@ -49,7 +49,11 @@ function toggle(id) {
|
||||||
if (!$_SESSION["tokens"][$_GET["server"]]["?logout"]) {
|
if (!$_SESSION["tokens"][$_GET["server"]]["?logout"]) {
|
||||||
$_SESSION["tokens"][$_GET["server"]]["?logout"] = rand(1, 1e6);
|
$_SESSION["tokens"][$_GET["server"]]["?logout"] = rand(1, 1e6);
|
||||||
}
|
}
|
||||||
if (isset($_SESSION["databases"][$_GET["server"]]) && !isset($_GET["sql"])) {
|
$databases = &$_SESSION["databases"][$_GET["server"]];
|
||||||
|
if (strlen($_GET["db"]) && $databases && !in_array($_GET["db"], $databases, true)) {
|
||||||
|
$databases = null;
|
||||||
|
}
|
||||||
|
if (isset($databases) && !isset($_GET["sql"])) {
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
if ($error) {
|
if ($error) {
|
||||||
|
|
Loading…
Reference in a new issue