]> git.joonet.de Git - adminer.git/commitdiff
Unobtrusive cookies
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 27 Jul 2007 11:02:05 +0000 (11:02 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 27 Jul 2007 11:02:05 +0000 (11:02 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@275 7c3ca157-0c34-0410-bff1-cbf682f78f5c

lang.inc.php
sql.inc.php

index 1c0973683cfc9fd982b7614f44272024d8527249..cb6dcdebc2295bd721b4b774280004215b301150 100644 (file)
@@ -32,7 +32,7 @@ function switch_lang() {
 }
 
 if (isset($_GET["lang"])) {
-       setcookie("lang", $_GET["lang"], strtotime("+1 month"));
+       setcookie("lang", $_GET["lang"], strtotime("+1 month"), preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]));
        $_COOKIE["lang"] = $_GET["lang"];
 }
 
index f82e73411eab3aa9687af4bf46f4f1c481c0d333..b6088ae47992ff7e12e19832b51b9363990cd527 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($_POST["query"])) {
-       setcookie("highlight", $_POST["highlight"], strtotime("+1 month"));
+       setcookie("highlight", $_POST["highlight"], strtotime("+1 month"), preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]));
        $_COOKIE["highlight"] = $_POST["highlight"];
 }