diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-04-26 23:13:31 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-04-26 23:13:31 +0200 |
commit | cdfbd5281e4dec7278a07943832c2590c1141eb3 (patch) | |
tree | 207cbf75e1783db8c6d05ab2ab1f179fce56efc8 | |
parent | 1991379f11af083675b60979c5d9f2a9bba213a4 (diff) |
Fixed issue #122 - ruri_string() in subdirs.
-rwxr-xr-x | system/core/Router.php | 5 | ||||
-rwxr-xr-x | system/core/URI.php | 4 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/system/core/Router.php b/system/core/Router.php index 5477fed5d..fa88cb3dc 100755 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -237,9 +237,12 @@ class CI_Router { $segments[1] = 'index'; } + // This is being routed to a file in a sub directory + $this->directory and array_unshift($segments, trim($this->directory, '/')); + // Update our "routed" segment array to contain the segments. // Note: If there is no custom routing, this array will be - // identical to $this->uri->segments + // identical to $this->uri->segments $this->uri->rsegments = $segments; } diff --git a/system/core/URI.php b/system/core/URI.php index 48bb7ae3c..17300df07 100755 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -641,10 +641,10 @@ class CI_URI { */ public function ruri_string() { - return '/'.implode('/', $this->rsegment_array()); + return implode('/', $this->rsegment_array()); } } /* End of file URI.php */ -/* Location: ./system/core/URI.php */ +/* Location: ./system/core/URI.php */
\ No newline at end of file diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1c8647bb7..615e0f734 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -195,6 +195,7 @@ Bug fixes for 3.0 - Fixed a bug in :doc:`Trackback Library <libraries/trackback>` method validate_url() where it didn't actually do anything, due to input not being passed by reference. - Fixed a bug (#11, #183, #863) - CI_Form_validation::_execute() silently continued to the next rule, if a rule method/function is not found. - Fixed a bug (#1242) Added Windows path compatibility to function read_dir of ZIP library +- Fixed a bug (#122) Where routed uri string was being reported incorrectly in sub-directories Version 2.1.1 ============= |