From 657916aad154eb27deb70875303edd4856e894dc Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Fri, 28 Sep 2007 04:26:38 +0000 Subject: [PATCH] Fixed lighty flushing bug git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.0@42779 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- main.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/main.php b/main.php index 283d9efb8..da5267c0a 100644 --- a/main.php +++ b/main.php @@ -43,6 +43,16 @@ foreach($envFiles as $envFile) { } } +if(isset($_GET['url'])) { + $url = $_GET['url']; + +// Lighttpd uses this +} else { + list($url, $query) = explode('?', $_SERVER['REQUEST_URI'], 2); + parse_str($query, $_GET); + if($_GET) $_REQUEST = array_merge((array)$_REQUEST, (array)$_GET); +} + if(ManifestBuilder::staleManifest()){ ManifestBuilder::compileManifest(); } @@ -83,15 +93,7 @@ if(isset($_GET['debug_profile'])) Profiler::unmark('DB::connect'); // Get the request URL $baseURL = dirname(dirname($_SERVER['SCRIPT_NAME'])); -if(isset($_GET['url'])) { - $url = $_GET['url']; - -// Lighttpd uses this -} else { - list($url, $query) = explode('?', $_SERVER['REQUEST_URI'], 2); - parse_str($query, $_GET); - if($_GET) $_REQUEST = array_merge((array)$_REQUEST, (array)$_GET); -} + if(substr($url,0,strlen($baseURL)) == $baseURL) $url = substr($url,strlen($baseURL));