Project

General

Profile

« Previous | Next » 

Revision 13665

web/username_prefix.php: $_SERVER["PHP_AUTH_USER"] test: factored $_SERVER["SCRIPT_URL"] out of both branches of if statement

View differences:

username_prefix.php
8 8
}
9 9
else
10 10
{
11
	$dest = "";
12
	if ($_SERVER["PHP_AUTH_USER"] !== "")
13
	{
14
		$subpath = "."/*force dotpath*/.user2path($_SERVER["PHP_AUTH_USER"]);
15
		$dest = $_SERVER["SCRIPT_URL"]."?".$subpath
16
			.$_SERVER["QUERY_STRING"]; # prepend to query string
17
	}
18
	else $dest = $_SERVER["SCRIPT_URL"]; # user empty->display page (remove ? )
11
	$dest = $_SERVER["SCRIPT_URL"]."?";
12
	if ($_SERVER["PHP_AUTH_USER"] !== "") # prepend to query string
13
		$dest .= "."/*force dotpath*/.user2path($_SERVER["PHP_AUTH_USER"]);
14
	$dest .= $_SERVER["QUERY_STRING"];
19 15
	
20 16
	header("Location: ".$dest);
21 17
}

Also available in: Unified diff