]> git.mjollnir.org Git - s9y.git/commitdiff
try to make it work with IIS
authorgarvinhicking <garvinhicking>
Wed, 20 Apr 2005 13:48:52 +0000 (13:48 +0000)
committergarvinhicking <garvinhicking>
Wed, 20 Apr 2005 13:48:52 +0000 (13:48 +0000)
docs/NEWS
include/compat.inc.php

index 4cb8c816e2ab2b4344914ac9f849b715a4586e45..4e84bfc8b0681927c8743895ce7def9baace7098 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 0.9 ()
 ------------------------------------------------------------------------
 
+    * Some IIS webserver compatibility for $_SERVER variables. This should
+      ensure most basic operations. (garvinhicking)
+
     * Media manager: Allow to upload as many files as you want via 
       JavaScript interaction and "add more images" button. (garvinhicking)
       
index b9ee22affec180c70a1886ec5587a9195c38e9f4..2c74ec510f7c5ca2f9190029480d7e5532b6a19c 100644 (file)
@@ -106,6 +106,11 @@ $serendipity['GET']    = &$_GET['serendipity'];
 $serendipity['POST']   = &$_POST['serendipity'];
 $serendipity['COOKIE'] = &$_COOKIE['serendipity'];
 
+// Attempt to fix IIS compatibility
+if (empty($_SERVER['REQUEST_URI'])) {
+    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
+}
+
 // Some security issues
 if (isset($serendipity['GET']['searchTerm'])) {
     $serendipity['GET']['searchTerm'] = htmlspecialchars(strip_tags($serendipity['GET']['searchTerm']));