remove_from_uri()

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@277 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-27 11:43:44 +00:00
parent ea1bb7dd5b
commit d41d44606e
5 changed files with 11 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ if (isset($_POST["server"])) {
$_SESSION["passwords"][$_POST["server"]] = $_POST["password"];
if (count($_POST) == count($ignore)) {
if ((string) $_GET["server"] === $_POST["server"]) {
$location = preg_replace('~(\\?)' . urlencode(session_name()) . '=[^&]*&|[&?]' . urlencode(session_name()) . '=[^&]*~', '\\1', $_SERVER["REQUEST_URI"]);
$location = remove_from_uri();
} else {
$location = preg_replace('~^[^?]*/([^?]*).*~', '\\1', $_SERVER["REQUEST_URI"]) . (strlen($_POST["server"]) ? '?server=' . urlencode($_POST["server"]) : '');
}