From 7ebfcde7f2e77bb4bff8e452d41c246d8893aaaf Mon Sep 17 00:00:00 2001 From: wumo Date: Wed, 21 Mar 2018 16:01:12 +0800 Subject: [PATCH] * Fix the bug of comment and setting key. --- module/custom/control.php | 2 +- module/custom/lang/en.php | 2 +- module/custom/lang/zh-cn.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index b67005eb9e..444ec5d9e7 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -117,7 +117,7 @@ class custom extends control { /* Fix bug #942. */ if(!empty($key)) $key = trim($key); - if($field == 'priList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->priListKey)); + if($field == 'priList' and !is_numeric($key) or $key > 255) 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)); if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) die(js::alert($this->lang->custom->notice->keyList)); diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 1a7aed64ab..9885d04370 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -88,7 +88,7 @@ $lang->custom->notice->canNotAdd = 'These items are parameters of cal $lang->custom->notice->forceReview = '%s Review is required for certain submitters.'; $lang->custom->notice->forceNotReview = "%s Review is NOT required for certain submitters."; $lang->custom->notice->longlife = 'Define shelved bugs.'; -$lang->custom->notice->priListKey = 'Priority list key should be numbers!'; +$lang->custom->notice->priListKey = 'Priority list key should be a natural and not greater than 255.'; $lang->custom->notice->keyList = 'The key should be a combination of lowercase English letters, numbers or underscores'; $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 go to Product Homepage?"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index ffaa5848b0..4022d5052a 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -88,7 +88,7 @@ $lang->custom->notice->canNotAdd = '该项参与运算,不提供自 $lang->custom->notice->forceReview = "指定人提交的%s必须评审。"; $lang->custom->notice->forceNotReview = "指定人提交的%s不需要评审。"; $lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。'; -$lang->custom->notice->priListKey = '优先级的键应当为数字!'; +$lang->custom->notice->priListKey = '优先级的键应当为不大于255的自然数'; $lang->custom->notice->keyList = '键值应当为小写英文字母、数字或下划线的组合'; $lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!'; $lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";