Merge branch 'zentaopms_9.8' of github.com:easysoft/zentaopms into zentaopms_9.8

This commit is contained in:
wangyidong
2018-03-23 10:09:11 +08:00
6 changed files with 56 additions and 26 deletions
+26 -6
View File
@@ -115,14 +115,34 @@ class custom extends control
{
foreach($_POST['keys'] as $index => $key)
{
/* Fix bug #942. */
if(!empty($key)) $key = trim($key);
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));
/* Invalid key. It should be numbers. (It includes severityList in bug module and priList in stroy, task, bug, testcasea, testtask and todo module.) */
if($field == 'priList' or $field == 'severityList')
{
if(!is_numeric($key) or $key > 255) die(js::alert($this->lang->custom->notice->invalidNumberKey));
}
if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) die(js::alert($this->lang->custom->notice->invalidStringKey));
/* the length of role is 20, check it when save. */
if($module == 'user' and $field == 'roleList' and strlen($key) > 10) die(js::alert($this->lang->custom->notice->userRole));
/* The length of role is 10, check it when saved. */
if($field == 'roleList' or $module == 'todo' and $field == 'typeList')
{
if(strlen($key) > 10) die(js::alert($this->lang->custom->notice->invalidStrlen['ten']));
}
/* The length of these string is litter than 20, check it when saved. */
if($field == 'sourceList' or $module == 'task' and $field == 'typeList')
{
if(strlen($key) > 20) die(js::alert($this->lang->custom->notice->invalidStrlen['twenty']));
}
/* The length of stageList is 255, check it when saved. */
if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) die(js::alert($this->lang->custom->notice->invalidStrlen['twoHundred']));
/* The length of these string is litter than 30, check it when saved. */
if($module == 'bug' or $field == 'reasonList' or $module == 'testcase')
{
if(strlen($key) > 30) die(js::alert($this->lang->custom->notice->invalidStrlen['thirty']));
}
}
$lang = $_POST['lang'];
+8 -4
View File
@@ -83,18 +83,22 @@ $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 10 characters!';
$lang->custom->notice->canNotAdd = 'These items are parameters of calculation, so customized creation is not enabled.';
$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 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->invalidNumberKey = 'Priority list key should be a natural and not greater than 255.';
$lang->custom->notice->invalidStringKey = 'The key should be a combination of lowercase English letters, numbers or underscores';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to go to Product Homepage?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to go to Project Homepage?";
$lang->custom->notice->indexPage['qa'] = "ZenTao 8.2+ has QA Homepage. Do you want to go to QA Homepage?";
$lang->custom->notice->invalidStrlen['ten'] = 'The length of the key must be less than 10 characters.';
$lang->custom->notice->invalidStrlen['twenty'] = 'The length of the key must be less than 20 characters.';
$lang->custom->notice->invalidStrlen['thirty'] = 'The length of the key must be less than 30 characters.';
$lang->custom->notice->invalidStrlen['twoHundred'] = 'The length of the key must be less than 225 characters.';
$lang->custom->storyReview = 'Review';
$lang->custom->forceReview = 'Selective Review';
$lang->custom->forceNotReview = 'No review';
+15 -11
View File
@@ -83,17 +83,21 @@ $lang->custom->allLang = '适用所有语言';
$lang->custom->confirmRestore = '是否要恢复默认配置?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '键的长度必须小于10个字符!';
$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
$lang->custom->notice->forceReview = "指定人提交的%s必须评审。";
$lang->custom->notice->forceNotReview = "指定人提交的%s不需要评审。";
$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
$lang->custom->notice->priListKey = '优先级的键应当为不大于255的自然数';
$lang->custom->notice->keyList = '键值应当为小写英文字母、数字或下划线的组合';
$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版本起增加了测试主页视图,是否默认进入测试主页?";
$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
$lang->custom->notice->forceReview = "指定人提交的%s必须评审。";
$lang->custom->notice->forceNotReview = "指定人提交的%s不需要评审。";
$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
$lang->custom->notice->invalidNumberKey = '键值应为不大于255的数字';
$lang->custom->notice->invalidStringKey = '键值应当为小写英文字母、数字或下划线的组合';
$lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";
$lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?";
$lang->custom->notice->indexPage['qa'] = "从8.2版本起增加了测试主页视图,是否默认进入测试主页?";
$lang->custom->notice->invalidStrlen['ten'] = '键的长度必须小于10个字符!';
$lang->custom->notice->invalidStrlen['twenty'] = '键的长度必须小于20个字符!';
$lang->custom->notice->invalidStrlen['thirty'] = '键的长度必须小于30个字符!';
$lang->custom->notice->invalidStrlen['twoHundred'] = '键的长度必须小于225个字符!';
$lang->custom->storyReview = '评审流程';
$lang->custom->forceReview = '强制评审';
+2 -2
View File
@@ -273,7 +273,7 @@ class product extends control
$this->product->setMenu($this->products, $productID);
$product = $this->product->getStatByID($productID);
$product = $this->product->getById($productID);
$this->view->title = $this->lang->product->edit . $this->lang->colon . $product->name;
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
$this->view->position[] = $this->lang->product->edit;
@@ -390,7 +390,7 @@ class product extends control
{
$this->product->setMenu($this->products, $productID);
$product = $this->product->getStatByID($productID);
$product = $this->product->getStatByID($productID);
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
if(!$product) die(js::error($this->lang->notFound) . js::locate('back'));
+4 -2
View File
@@ -225,21 +225,23 @@ class task extends control
$position[] = $this->lang->task->common;
$position[] = $this->lang->task->batchCreate;
if($isChildren) $this->view->parentTitle = $this->dao->select('name')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch('name');
$this->view->title = $title;
$this->view->position = $position;
$this->view->project = $project;
$this->view->stories = $stories;
$this->view->modules = $modules;
$this->view->parent = $taskID;
$this->view->storyID = $storyID;
$this->view->isChildren = $isChildren;
$this->view->storyID = $storyID;
$this->view->story = $this->story->getByID($storyID);
$this->view->storyTasks = $this->task->getStoryTaskCounts(array_keys($stories), $projectID);
$this->view->members = $members;
$this->view->moduleID = $moduleID;
$this->display();
}
/**
* Common actions of task module.
*
+1 -1
View File
@@ -15,7 +15,7 @@
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['task']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $isChildren ? $lang->task->batchCreateChildren : $lang->task->batchCreate;?></strong>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $isChildren ? $parentTitle . '&nbsp; ' . $lang->task->batchCreateChildren : $lang->task->batchCreate;?></strong>
<?php if($project->type != 'ops'):?><span><small><a href='javascript:toggleZeroTaskStory();' id='zeroTaskStory'><?php echo $lang->story->zeroTask;?><i class='icon icon-remove'></i></a></small></span><?php endif;?>
<div class='actions'>
<?php echo html::commonButton($lang->pasteText, "data-toggle='myModal'", 'btn btn-primary')?>