| 235 | | // Find the URI string based on the location of the front controller |
| 236 | | if (($offset = strpos(self::$current_uri, KOHANA)) !== FALSE) |
| 237 | | { |
| 238 | | // Add the length of the index file to the offset |
| 239 | | $offset += strlen(KOHANA); |
| 240 | | |
| 241 | | // Get the segment part of the URL |
| 242 | | self::$current_uri = substr(self::$current_uri, $offset); |
| 243 | | self::$current_uri = trim(self::$current_uri, '/'); |
| | 235 | // The front controller directory and filename |
| | 236 | $fc = substr($_SERVER['SCRIPT_FILENAME'], strlen($_SERVER['DOCUMENT_ROOT'])); |
| | 237 | |
| | 238 | if (strpos(self::$current_uri, $fc) === 0) |
| | 239 | { |
| | 240 | // Remove the front controller from the current uri |
| | 241 | self::$current_uri = substr(self::$current_uri, strlen($fc)); |