From fd0c0a608a5de2b26c29d3c44a7929e5a3b2c042 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 18 May 2009 00:14:07 +0000 Subject: Updated kohana and modules/unit_test to upstream r4356 --- kohana/libraries/Router.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'kohana/libraries/Router.php') diff --git a/kohana/libraries/Router.php b/kohana/libraries/Router.php index 172c5f92..a47a9993 100644 --- a/kohana/libraries/Router.php +++ b/kohana/libraries/Router.php @@ -213,15 +213,12 @@ class Router_Core { elseif (isset($_SERVER['PHP_SELF']) AND $_SERVER['PHP_SELF']) { Router::$current_uri = $_SERVER['PHP_SELF']; - } - - // The front controller directory and filename - $fc = substr(realpath($_SERVER['SCRIPT_FILENAME']), strlen(DOCROOT)); - if (($strpos_fc = strpos(Router::$current_uri, $fc)) !== FALSE) - { - // Remove the front controller from the current uri - Router::$current_uri = substr(Router::$current_uri, $strpos_fc + strlen($fc)); + if (($strpos_fc = strpos(Router::$current_uri, KOHANA)) !== FALSE) + { + // Remove the front controller from the current uri + Router::$current_uri = substr(Router::$current_uri, $strpos_fc + strlen(KOHANA)); + } } // Remove slashes from the start and end of the URI -- cgit v1.2.3