]> git.joonet.de Git - adminer.git/commitdiff
IIS 7 compatibility
authorJakub Vrana <jakub@vrana.cz>
Thu, 8 Sep 2011 21:48:34 +0000 (23:48 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 8 Sep 2011 21:48:34 +0000 (23:48 +0200)
adminer/include/bootstrap.inc.php

index 4e2a43eb1a6ec6d55dd6301841a99ab948abb777..1413f088aa47c28a67cd1017ef4fe004d6d0d820 100644 (file)
@@ -22,8 +22,11 @@ if (isset($_GET["file"])) {
 include "../adminer/include/functions.inc.php";
 
 global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $structured_types, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
-if (!isset($_SERVER["REQUEST_URI"])) {
-       $_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"] . ($_SERVER["QUERY_STRING"] != "" ? "?$_SERVER[QUERY_STRING]" : ""); // IIS 5 compatibility
+if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
+       $_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"]; 
+}
+if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
+       $_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
 }
 $HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off");