mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Merge branch 'next' into next-db
This commit is contained in:
commit
6a98d061b7
1 changed files with 11 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ class Router
|
|||
}
|
||||
|
||||
// Try to detect the prefix. This might be $mid.
|
||||
if ($rewrite_level >= 2 && preg_match('#^([a-zA-Z0-9_-]+)(?:/(.*))?#s', $url, $matches))
|
||||
if ($rewrite_level >= 2 && preg_match('#^([a-zA-Z0-9_-]+)(?:/(.*))?$#s', $url, $matches))
|
||||
{
|
||||
// Separate the prefix and the internal part of the URL.
|
||||
$prefix = $matches[1];
|
||||
|
|
@ -159,6 +159,16 @@ class Router
|
|||
// If a module is found, try its routes.
|
||||
if ($action_info)
|
||||
{
|
||||
// Try the index action.
|
||||
if ($internal_url === '' && !isset($args['act']) && $action_info->default_index_act)
|
||||
{
|
||||
$allargs = array_merge($args, [$prefix_type => $prefix]);
|
||||
$result->module = $module_name;
|
||||
$result->mid = $prefix_type === 'mid' ? $prefix : '';
|
||||
$result->args = $allargs;
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Try the list of routes defined by the module.
|
||||
foreach ($action_info->route->{$method} as $regexp => $action)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue