From 403e75c9748bc7c93c40ed13343ec5b687739074 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Fri, 23 Dec 2016 10:30:06 +0800 Subject: [PATCH] * fix bug #942. --- module/custom/control.php | 7 +++++-- module/custom/lang/en.php | 10 ++++++---- module/custom/lang/zh-cn.php | 10 ++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index d1048e3fc0..f952e328a3 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -88,8 +88,11 @@ class custom extends control $value = $_POST['values'][$index]; $system = $_POST['systems'][$index]; - //Fix bug #951. - //if(!$system and (!$value or !$key)) continue; + //if(!$system and (!$value or !$key)) continue; //Fix bug #951. + + /* Fix bug #942. */ + if($field == 'priList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->priListKey)); + if($module == 'bug' and $field == 'severityList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->severityListKey)); /* the length of role is 20, check it when save. */ if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole)); diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 659759db6e..61b233a36b 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -69,10 +69,12 @@ $lang->custom->allLang = 'All Language'; $lang->custom->confirmRestore = 'Do you want to reset to Default?'; $lang->custom->notice = new stdclass(); -$lang->custom->notice->userRole = 'Key must be no more than 20 characters!'; -$lang->custom->notice->canNotAdd = 'This item will be processed, so customized feature is not enabled.'; -$lang->custom->notice->forceReview = 'Review is required for stories submitted by certain assignee.'; -$lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.'; +$lang->custom->notice->userRole = 'Key must be no more than 20 characters!'; +$lang->custom->notice->canNotAdd = 'This item will be processed, so customized feature is not enabled.'; +$lang->custom->notice->forceReview = 'Review is required for stories submitted by certain assignee.'; +$lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.'; +$lang->custom->notice->priListKey = 'Priority list key should be numbers!'; +$lang->custom->notice->severityListKey = 'Bug severity list key should be numbers.'; $lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to enter Product Homepage?"; $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to enter Project Homepage?"; $lang->custom->notice->indexPage['qa'] = "ZenTao 8.2+ has Testing Homepage. Do you want to enter Testing Homepage?"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 00b2aba1c4..a3860fdc60 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -69,10 +69,12 @@ $lang->custom->allLang = '适用所有语言'; $lang->custom->confirmRestore = '是否要恢复默认配置?'; $lang->custom->notice = new stdclass(); -$lang->custom->notice->userRole = '键的长度必须小于20个字符!'; -$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能'; -$lang->custom->notice->forceReview = '指定人提交的需求必须评审。'; -$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。'; +$lang->custom->notice->userRole = '键的长度必须小于20个字符!'; +$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能'; +$lang->custom->notice->forceReview = '指定人提交的需求必须评审。'; +$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。'; +$lang->custom->notice->priListKey = '优先级的键应当为数字!'; +$lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?"; $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?"; $lang->custom->notice->indexPage['qa'] = "从8.2版本起增加了测试主页视图,是否默认进入测试主页?";