From cdfbd5281e4dec7278a07943832c2590c1141eb3 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 26 Apr 2012 22:13:31 +0100 Subject: Fixed issue #122 - ruri_string() in subdirs. --- system/core/Router.php | 5 ++++- system/core/URI.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'system/core') 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 -- cgit v1.2.3-24-g4f1b