Mercurial > hg > batmud > maputils
changeset 1918:3075415f052e
Get rid of PHP_SELF usage.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 07 Nov 2017 19:09:11 +0200 |
parents | 4907488abfc6 |
children | 9193e7a8c9ca |
files | www/loc.php |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/www/loc.php Mon Nov 06 21:28:29 2017 +0200 +++ b/www/loc.php Tue Nov 07 19:09:11 2017 +0200 @@ -35,9 +35,7 @@ echo " <a class=\"control continent ".$qclass. - "\" href=\"".$_SERVER["PHP_SELF"]. - (strlen($s) > 0 ? "?".$s : ""). - "\">".$desc."</a>\n"; + "\" href=\"?".$s."\">".$desc."</a>\n"; } @@ -193,7 +191,7 @@ echo "<h1>".$mtitle."BatMUD".(isset($coderName) ? " by ".chentities($coderName) : "")."</h1>\n". - "<form action=\"".$_SERVER["PHP_SELF"]."\" method=\"get\">\n". + "<form action=\"?\" method=\"get\">\n". "<div class=\"controls\">\n"; if (isset($setName)) @@ -255,7 +253,7 @@ if (qcheck($wizTable[$coderName], "desc", $str)) { // Handle special tags - $str = preg_replace("/\~([A-Z][a-z]+)\~/i", "<a href=\"".$_SERVER["PHP_SELF"]."?a=\${1}\">\${1}</a>", $str); + $str = preg_replace("/\~([A-Z][a-z]+)\~/i", "<a href=\"?a=\${1}\">\${1}</a>", $str); foreach ($specTags as $tag => $rep) $str = preg_replace("/\[".$tag."\]/i", $rep, $str); @@ -404,7 +402,7 @@ default: $qs = ""; } if ($filter != "C" || !$applyFilter) - $fs[] = "<a ".$qs." href=\"".$_SERVER["PHP_SELF"]."?a=".$name["name"]."\">".$name["name"]."</a>"; + $fs[] = "<a ".$qs." href=\"?a=".$name["name"]."\">".$name["name"]."</a>"; else $fs[] = $name["name"]; }