From c38c7037d0e8028912030fa3317b6180e62d8bd8 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 30 Jan 2008 15:38:56 +0000 Subject: bugfix (#1842) - added 'index' to routed segment array when only the controller was specified in the URI. --- system/libraries/Router.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Router.php b/system/libraries/Router.php index fd0ffa22a..d24192c18 100644 --- a/system/libraries/Router.php +++ b/system/libraries/Router.php @@ -158,6 +158,12 @@ class CI_Router { $this->set_method($segments[1]); } } + else + { + // This lets the "routed" segment array identify that the default + // index method is being used. + $segments[1] = 'index'; + } // Update our "routed" segment array to contain the segments. // Note: If there is no custom routing, this array will be @@ -271,7 +277,7 @@ class CI_Router { return; } } - + // If we got this far it means we didn't encounter a // matching route so we'll set the site default route $this->_set_request($this->uri->segments); -- cgit v1.2.3-24-g4f1b