提交者
Karson
!110 修复前台路径中控制器是带下划线,权限验证失败
Merge pull request !110 from CoolAbc/master
正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
@@ -7,6 +7,7 @@ use think\Config; | @@ -7,6 +7,7 @@ use think\Config; | ||
7 | use think\Controller; | 7 | use think\Controller; |
8 | use think\Hook; | 8 | use think\Hook; |
9 | use think\Lang; | 9 | use think\Lang; |
10 | +use think\Loader; | ||
10 | use think\Session; | 11 | use think\Session; |
11 | use fast\Tree; | 12 | use fast\Tree; |
12 | 13 | ||
@@ -114,7 +115,7 @@ class Backend extends Controller | @@ -114,7 +115,7 @@ class Backend extends Controller | ||
114 | public function _initialize() | 115 | public function _initialize() |
115 | { | 116 | { |
116 | $modulename = $this->request->module(); | 117 | $modulename = $this->request->module(); |
117 | - $controllername = strtolower($this->request->controller()); | 118 | + $controllername = Loader::parseName($this->request->controller()); |
118 | $actionname = strtolower($this->request->action()); | 119 | $actionname = strtolower($this->request->action()); |
119 | 120 | ||
120 | $path = str_replace('.', '/', $controllername) . '/' . $actionname; | 121 | $path = str_replace('.', '/', $controllername) . '/' . $actionname; |
-
请 注册 或 登录 后发表评论