From: garvinhicking Date: Wed, 20 Apr 2005 13:48:52 +0000 (+0000) Subject: try to make it work with IIS X-Git-Tag: 0.8.1~30^2~17 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4ab89a2e7f557fbd90e3c6f9cad28288a5a3cbb2;p=s9y.git try to make it work with IIS --- diff --git a/docs/NEWS b/docs/NEWS index 4cb8c81..4e84bfc 100644 --- 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) diff --git a/include/compat.inc.php b/include/compat.inc.php index b9ee22a..2c74ec5 100644 --- a/include/compat.inc.php +++ b/include/compat.inc.php @@ -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']));