1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Improve session management

This commit is contained in:
Jakub Vrana
2012-08-19 13:42:13 -07:00
parent c9da3ccb51
commit 5e0038b62d
6 changed files with 16 additions and 8 deletions

View File

@@ -39,9 +39,6 @@ if (!$error && $_POST) {
}
}
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";
if (!ini_bool("session.use_cookies")) {
session_write_close();
}
$delimiter = ";";
$offset = 0;
$empty = true;
@@ -136,7 +133,7 @@ if (!$error && $_POST) {
if (preg_match("~^$space*(CREATE|DROP|ALTER)$space+(DATABASE|SCHEMA)\\b~isU", $q)) {
restart_session();
set_session("dbs", null); // clear cache
session_write_close();
stop_session();
}
if (!$_POST["only_errors"]) {
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "$time\n";