From a6f43d56304c02ecb5117ed2d79a192615c158a0 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sat, 6 Mar 2010 11:36:11 +0000 Subject: [PATCH] =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B8=20=D0=B2=20=D0=BF=D0=BE=D0=B4=D0=BA=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/classes/Router.class.php | 2 +- install/index.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/classes/Router.class.php b/engine/classes/Router.class.php index 1fd2f0f9..9f98b964 100644 --- a/engine/classes/Router.class.php +++ b/engine/classes/Router.class.php @@ -98,7 +98,7 @@ class Router extends Object { * @return string */ protected function GetRequestUri() { - $sReq=preg_replace("/\/+/",'/',$_SERVER['REQUEST_URI']); + $sReq=preg_replace("/\/+/",'/',str_replace(preg_replace("@/*index\.php@U",'',$_SERVER['PHP_SELF']),'',$_SERVER['REQUEST_URI'])); $sReq=preg_replace("/^\/(.*)\/?$/U",'\\1',$sReq); $sReq=preg_replace("/^(.*)\/\?.*$/U",'\\1',$sReq); diff --git a/install/index.php b/install/index.php index 3f1f628d..3f1f1181 100644 --- a/install/index.php +++ b/install/index.php @@ -1515,11 +1515,11 @@ class Install { } function GetPathRootWeb() { - return rtrim('http://'.$_SERVER['HTTP_HOST'],'/'); + return rtrim('http://'.$_SERVER['HTTP_HOST'],'/').str_replace('/install/index.php','',$_SERVER['PHP_SELF']); } function GetPathRootServer() { - return rtrim($_SERVER['DOCUMENT_ROOT'],'/'); + return rtrim(dirname(dirname(__FILE__)),'/'); } }