切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
8 years ago
提交
fb6c6bffe2d8eb756aa9088f8f71fd4ec86b4944
1 个父辈
332e786a
修复菜单无法通过命令行删除的BUG
修复语言标识可能导致的XSS的BUG 修复路由未对admin模块失效的BUG
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
4 行增加
和
5 行删除
application/admin/command/Menu.php
application/common/controller/Backend.php
application/common/controller/Frontend.php
application/route.php
application/admin/command/Menu.php
查看文件 @
fb6c6bf
...
...
@@ -31,7 +31,6 @@ class Menu extends Command
{
$this
->
model
=
new
AuthRule
();
$adminPath
=
dirname
(
__DIR__
)
.
DS
;
$moduleName
=
'admin'
;
//控制器名
$controller
=
$input
->
getOption
(
'controller'
)
?:
''
;
if
(
!
$controller
)
...
...
@@ -47,7 +46,7 @@ class Menu extends Command
throw
new
Exception
(
"could not delete all menu"
);
}
$ids
=
[];
$list
=
$this
->
model
->
where
(
'name'
,
'like'
,
"/
{
$moduleName
}
/"
.
strtolower
(
$controller
)
.
"%"
)
->
select
();
$list
=
$this
->
model
->
where
(
'name'
,
'like'
,
strtolower
(
$controller
)
.
"%"
)
->
select
();
foreach
(
$list
as
$k
=>
$v
)
{
$output
->
warning
(
$v
->
name
);
...
...
application/common/controller/Backend.php
查看文件 @
fb6c6bf
...
...
@@ -135,7 +135,7 @@ class Backend extends Controller
}
// 语言检测
$lang
=
Lang
::
detect
(
);
$lang
=
strip_tags
(
Lang
::
detect
()
);
$site
=
Config
::
get
(
"site"
);
...
...
application/common/controller/Frontend.php
查看文件 @
fb6c6bf
...
...
@@ -30,7 +30,7 @@ class Frontend extends Controller
}
// 语言检测
$lang
=
Lang
::
detect
(
);
$lang
=
strip_tags
(
Lang
::
detect
()
);
$site
=
Config
::
get
(
"site"
);
...
...
application/route.php
查看文件 @
fb6c6bf
...
...
@@ -11,7 +11,7 @@
// +----------------------------------------------------------------------
//如果有定义绑定后台模块则禁用路由规则
if
(
defined
(
'BIND_MODULE'
)
&&
BIND_MODULE
==
'admin'
)
if
(
\think\Route
::
getBind
(
'module'
)
==
'admin'
)
return
[];
return
[
...
...
请
注册
或
登录
后发表评论