From b2675159482af40004e32ec30fbf6f52cfe62a51 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Tue, 30 Sep 2008 21:07:22 +0000 Subject: Fixed a routing bug that occurred when the default route pointed to a subfolder. Bug report: http://codeigniter.com/bug_tracker/bug/4661/ --- system/libraries/Router.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'system') diff --git a/system/libraries/Router.php b/system/libraries/Router.php index 4b90b4bd2..f1923794e 100644 --- a/system/libraries/Router.php +++ b/system/libraries/Router.php @@ -63,7 +63,7 @@ class CI_Router { * @return void */ function _set_routing() - { + { // Are query strings enabled in the config file? // If so, we're done since segment based URIs are not used with query strings. if ($this->config->item('enable_query_strings') === TRUE AND isset($_GET[$this->config->item('controller_trigger')])) @@ -97,16 +97,8 @@ class CI_Router { { show_error("Unable to determine what should be displayed. A default route has not been specified in the routing file."); } - - $this->set_class($this->default_controller); - $this->set_method('index'); - $this->_set_request(array($this->default_controller, 'index')); - - // re-index the routed segments array so it starts with 1 rather than 0 - $this->uri->_reindex_segments(); - - log_message('debug', "No URI present. Default controller set."); - return; + + $this->uri->uri_string = $this->default_controller; } unset($this->routes['default_controller']); -- cgit v1.2.3-24-g4f1b