From 5d2f8443ab7a528ffb2882559836cf8c00eacd0b Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Mon, 18 Nov 2019 11:14:03 +0800
Subject: [PATCH 1/2] * Finish task #6499.
---
module/group/model.php | 4 ++++
module/testtask/lang/zh-cn.php | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/module/group/model.php b/module/group/model.php
index c195cbe969..056d98b5d7 100644
--- a/module/group/model.php
+++ b/module/group/model.php
@@ -290,6 +290,10 @@ class groupModel extends model
}
$actions['actions'] = $dynamic;
+ /* If not select any projects or products, set it empty. */
+ if(isset($actions['products'][0]) && !$actions['products'][0]) $actions['products'] = array();
+ if(isset($actions['projects'][0]) && !$actions['projects'][0]) $actions['projects'] = array();
+
$actions = empty($actions) ? '' : json_encode($actions);
$this->dao->update(TABLE_GROUP)->set('acl')->eq($actions)->where('id')->eq($groupID)->exec();
return dao::isError() ? false : true;
diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php
index 35e2f52550..7e2f1865b3 100644
--- a/module/testtask/lang/zh-cn.php
+++ b/module/testtask/lang/zh-cn.php
@@ -108,7 +108,7 @@ $lang->testtask->fail = '失败';
$lang->testtask->showResult = '共执行%s次';
$lang->testtask->showFail = '失败%s次';
-$lang->testtask->confirmDelete = '您确认要删除该版本吗?';
+$lang->testtask->confirmDelete = '您确认要删除该测试单吗?';
$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?';
$lang->testtask->noticeNoOther = '该产品还没有其他测试版本';
$lang->testtask->noTesttask = '暂时没有测试版本。';
From 029c22e0ac5bdce3bb247bf7534feb1f3ae420ca Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Mon, 18 Nov 2019 11:26:30 +0800
Subject: [PATCH 2/2] * Finish task #6500.
---
module/custom/control.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/custom/control.php b/module/custom/control.php
index 4c7fa072f9..a818e90a8c 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -131,7 +131,7 @@ class custom extends control
{
if(!is_numeric($key) or $key > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidNumberKey));
}
- if(!empty($key) and !isset($oldCustoms[$key]) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey));
+ if(!empty($key) and !empty($oldCustoms) and !isset($oldCustoms[$key]) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey));
/* The length of roleList in user module and typeList in todo module is less than 10. check it when saved. */
if($field == 'roleList' or $module == 'todo' and $field == 'typeList')