diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-06-06 15:24:49 -0700 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-06-06 15:24:49 -0700 |
commit | b9ee6f7d185c734dcff595d06d9c6e6fda5822ac (patch) | |
tree | 4cc37bde852469449afd0989bfceeeddac84a200 /system/libraries/Router.php | |
parent | 0e415dae9b29d792f631d3b94349086b8094c920 (diff) | |
parent | b179b106c2b4d3971498f513ffc71eff1b6b1a5d (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'system/libraries/Router.php')
-rw-r--r-- | system/libraries/Router.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/system/libraries/Router.php b/system/libraries/Router.php index 6dc9b10c..ef0e1e47 100644 --- a/system/libraries/Router.php +++ b/system/libraries/Router.php @@ -2,7 +2,7 @@ /** * Router * - * $Id: Router.php 4350 2009-05-14 18:58:18Z zombor $ + * $Id: Router.php 4391 2009-06-04 03:10:12Z zombor $ * * @package Core * @author Kohana Team @@ -213,17 +213,17 @@ class Router_Core { elseif (isset($_SERVER['PHP_SELF']) AND $_SERVER['PHP_SELF']) { Router::$current_uri = $_SERVER['PHP_SELF']; - - 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)); - } } - + + if (($strpos_fc = strpos(Router::$current_uri, KOHANA)) !== FALSE) + { + // Remove the front controller from the current uri + Router::$current_uri = (string) substr(Router::$current_uri, $strpos_fc + strlen(KOHANA)); + } + // Remove slashes from the start and end of the URI Router::$current_uri = trim(Router::$current_uri, '/'); - + if (Router::$current_uri !== '') { if ($suffix = Kohana::config('core.url_suffix') AND strpos(Router::$current_uri, $suffix) !== FALSE) |