Commit 995310d6 by Taylor Otwell

Fix bug that prevented route directory route files from loading in modules.

parent e4bc62da
...@@ -60,6 +60,14 @@ class Loader { ...@@ -60,6 +60,14 @@ class Loader {
array_push($segments, substr($segment, 0, strpos($segment, '.'))); array_push($segments, substr($segment, 0, strpos($segment, '.')));
} }
// Shift the module name off of the beginning of the array so we can locate the
// appropriate route file. Since the module name will not be part of the directory
// structure, we need to get rid of it.
if (count($segments) > 0 and ACTIVE_MODULE !== 'application')
{
array_shift($segments);
}
// Work backwards through the URI segments until we find the deepest possible // Work backwards through the URI segments until we find the deepest possible
// matching route directory. Once we find it, we will return those routes. // matching route directory. Once we find it, we will return those routes.
foreach (array_reverse($segments, true) as $key => $value) foreach (array_reverse($segments, true) as $key => $value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment