Project

General

Profile

« Previous | Next » 

Revision 13626

web/username_prefix.php: has prefix: use same expr whether or not it has a query string, because the with-query-string expr works for both cases

View differences:

trunk/web/username_prefix.php
12 12
	if ($_SERVER["PHP_AUTH_USER"] !== "")
13 13
	{
14 14
		$subpath = "."/*force dotpath*/.user2path($_SERVER["PHP_AUTH_USER"]);
15
		if ($_SERVER["QUERY_STRING"] !== "") # prepend to query string
16
			$dest = $_SERVER["SCRIPT_URL"]."?".$subpath
17
			.ltrim($_SERVER["QUERY_STRING"], "@");
18
		else $dest = $_SERVER["REQUEST_URI"]/*ends in ? */.$subpath;
15
		$dest = $_SERVER["SCRIPT_URL"]."?".$subpath
16
			.ltrim($_SERVER["QUERY_STRING"], "@"); # prepend to query string
19 17
	}
20 18
	else $dest = rtrim($_SERVER["REQUEST_URI"], "?"); # user empty->display page
21 19
	

Also available in: Unified diff