Permalink
Browse files

Remove session_name() only without SID (bug #2910681)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1261 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent fc3b652 commit 483d7dc0ba9444105adaba6e21da4d96544ea981 jakubvrana committed Dec 8, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 adminer/include/functions.inc.php
@@ -284,8 +284,7 @@ function queries_redirect($location, $message, $redirect) {
* @return string
*/
function remove_from_uri($param = "") {
- $param = "($param|" . session_name() . ")";
- return substr(preg_replace("~(?<=[?&])$param=[^&]*&~", '', "$_SERVER[REQUEST_URI]&"), 0, -1);
+ return substr(preg_replace("~(?<=[?&])($param" . (SID ? "" : "|" . session_name()) . ")=[^&]*&~", '', "$_SERVER[REQUEST_URI]&"), 0, -1);
}
/** Generate page number for pagination

0 comments on commit 483d7dc

Please sign in to comment.