切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
Karson
5 years ago
提交者
Gitee
5 years ago
提交
014c29fcd265d52d925cd5770e8f7c0eded3a1bd
2 个父辈
f8714972
a3fc3f85
!154 修复分类管理中可将父id设置为自己的错误
Merge pull request !154 from saynone/master
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
3 行增加
和
3 行删除
application/admin/controller/Category.php
application/admin/lang/zh-cn/category.php
application/admin/controller/Category.php
查看文件 @
014c29f
...
...
@@ -102,9 +102,9 @@ class Category extends Backend
$params
=
$this
->
preExcludeFields
(
$params
);
if
(
$params
[
'pid'
]
!=
$row
[
'pid'
])
{
$childrenIds
=
Tree
::
instance
()
->
init
(
collection
(
\app\common\model\Category
::
select
())
->
toArray
())
->
getChildrenIds
(
$row
[
'id'
]);
$childrenIds
=
Tree
::
instance
()
->
init
(
collection
(
\app\common\model\Category
::
select
())
->
toArray
())
->
getChildrenIds
(
$row
[
'id'
]
,
true
);
if
(
in_array
(
$params
[
'pid'
],
$childrenIds
))
{
$this
->
error
(
__
(
'Can not change the parent to child'
));
$this
->
error
(
__
(
'Can not change the parent to child
or itself
'
));
}
}
...
...
application/admin/lang/zh-cn/category.php
查看文件 @
014c29f
...
...
@@ -13,6 +13,6 @@ return [
'Updatetime'
=>
'更新时间'
,
'Weigh'
=>
'权重'
,
'Category warmtips'
=>
'温馨提示:栏目类型请前往<b>常规管理</b>-><b>系统配置</b>-><b>字典配置</b>中进行管理'
,
'Can not change the parent to child
'
=>
'父组别不能是它的子组别
'
,
'Can not change the parent to child
or itself'
=>
'父组别不能是它的子组别或它自己
'
,
'Status'
=>
'状态'
];
...
...
请
注册
或
登录
后发表评论