* fix bug #614.
This commit is contained in:
@@ -46,6 +46,10 @@ class custom extends control
|
||||
$value = $_POST['values'][$index];
|
||||
if(!$value or !$key) continue;
|
||||
$system = $_POST['systems'][$index];
|
||||
|
||||
/* 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));
|
||||
|
||||
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
|
||||
}
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
@@ -61,3 +61,6 @@ $lang->custom->currentLang = 'For current language';
|
||||
$lang->custom->allLang = 'For all language';
|
||||
|
||||
$lang->custom->confirmRestore = 'Are you sure to restore the default lang setting?';
|
||||
|
||||
$lang->custom->notice = new stdclass();
|
||||
$lang->custom->notice->userRole = 'The length of key must be less than 20!';
|
||||
|
||||
@@ -61,3 +61,6 @@ $lang->custom->currentLang = '适用当前语言';
|
||||
$lang->custom->allLang = '适用所有语言';
|
||||
|
||||
$lang->custom->confirmRestore = '是否要恢复默认语言配置?';
|
||||
|
||||
$lang->custom->notice = new stdclass();
|
||||
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
|
||||
|
||||
@@ -55,7 +55,7 @@ EOT;
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<form method='post' class='form-condensed'>
|
||||
<form method='post' class='form-condensed' target='hiddenwin'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading'>
|
||||
<strong><?php echo $lang->custom->object[$module] . ' >> ' . $lang->custom->$module->fields[$field]?></strong>
|
||||
|
||||
Reference in New Issue
Block a user