summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-01-30 16:38:56 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-01-30 16:38:56 +0100
commitc38c7037d0e8028912030fa3317b6180e62d8bd8 (patch)
treea6fe0ef81574be29bda1f69d7b304e56a073d04a
parent2d87b4d2fa7d2fd01876eaa8cf1f727d863d3e6c (diff)
bugfix (#1842) - added 'index' to routed segment array when only the controller was specified in the URI.
-rw-r--r--system/libraries/Router.php8
-rw-r--r--user_guide/changelog.html1
2 files changed, 8 insertions, 1 deletions
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);
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 200b4c0e7..1affd9dba 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -161,6 +161,7 @@ Change Log
<h3>Bug fixes for Version 1.6.0</h3>
<ul>
+ <li>Fixed a bug (#1842) where the $this->uri->rsegments array would not include the 'index' method if routed to the controller without an implicit method.</li>
<li>Fixed a bug (#1872) where word_limiter() was not retaining whitespace.</li>
<li>Fixed a bug (#1890) in csv_from_result() where content that included the delimiter would break the file.</li>
<li>Fixed a bug (#2542)in the clean_email() method of the Email class to allow for non-numeric / non-sequential array keys.</li>