* Check the key of user when setting.
This commit is contained in:
@@ -66,7 +66,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
|
||||
</td>
|
||||
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
|
||||
<td><?php echo $user->account;?></td>
|
||||
<td><?php echo $lang->user->roleList[$user->role];?></td>
|
||||
<td><?php echo isset($user->role) ? $lang->user->roleList[$user->role] : '';?></td>
|
||||
<td><?php echo html::mailto($user->email);?></td>
|
||||
<td><?php if(isset($lang->user->genderList[$user->gender])) echo $lang->user->genderList[$user->gender];?></td>
|
||||
<td><?php echo $user->phone;?></td>
|
||||
|
||||
@@ -116,9 +116,10 @@ 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)) 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-zA-Z_0-9]+$/')) die(js::alert($this->lang->custom->notice->keyList));
|
||||
if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) die(js::alert($this->lang->custom->notice->keyList));
|
||||
|
||||
/* 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));
|
||||
|
||||
@@ -89,7 +89,7 @@ $lang->custom->notice->forceReview = '%s Review is required for certain
|
||||
$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->keyList = 'key should be English or digital!';
|
||||
$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?";
|
||||
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to go to Project Homepage?";
|
||||
|
||||
@@ -89,7 +89,7 @@ $lang->custom->notice->forceReview = "指定人提交的%s必须评审
|
||||
$lang->custom->notice->forceNotReview = "指定人提交的%s不需要评审。";
|
||||
$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
|
||||
$lang->custom->notice->priListKey = '优先级的键应当为数字!';
|
||||
$lang->custom->notice->keyList = '键值应当为英文或数字';
|
||||
$lang->custom->notice->keyList = '键值应当为小写英文字母、数字或下划线的组合';
|
||||
$lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!';
|
||||
$lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";
|
||||
$lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?";
|
||||
|
||||
Reference in New Issue
Block a user