summaryrefslogtreecommitdiff
path: root/kohana/libraries/Router.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-18 00:14:07 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-18 00:14:07 +0000
commitfd0c0a608a5de2b26c29d3c44a7929e5a3b2c042 (patch)
tree387f2628cae3580b7f09682de6e908d002c5fbb0 /kohana/libraries/Router.php
parent5a6aef9c23930b1de609c9914297e0f97bc49a11 (diff)
Updated kohana and modules/unit_test to upstream r4356
Diffstat (limited to 'kohana/libraries/Router.php')
-rw-r--r--kohana/libraries/Router.php13
1 files changed, 5 insertions, 8 deletions
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