mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
修正Url类对驼峰控制器名的自动转换
This commit is contained in:
@@ -130,10 +130,10 @@ class Url
|
||||
$url = $module . CONTROLLER_NAME . '/' . ACTION_NAME;
|
||||
} else {
|
||||
$path = explode('/', $url);
|
||||
$len = count($path);
|
||||
if ($len < 3) {
|
||||
$url = $module . (1 == $len ? CONTROLLER_NAME . '/' : '') . $url;
|
||||
}
|
||||
$action = array_pop($path);
|
||||
$controller = empty($path) ? CONTROLLER_NAME : (Config::get('url_controller_convert') ? Loader::parseName(array_pop($path)) : array_pop($path));
|
||||
$module = empty($path) ? $module : array_pop($path);
|
||||
$url = ($module ? $module . '/' : '') . $controller . '/' . $action;
|
||||
}
|
||||
}
|
||||
return $url;
|
||||
|
||||
Reference in New Issue
Block a user