This commit is contained in:
wangyidong
2014-07-29 05:54:43 +00:00
parent 976343a086
commit 4207656905
4 changed files with 11 additions and 1 deletions
+4
View File
@@ -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()));
+3
View File
@@ -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!';
+3
View File
@@ -61,3 +61,6 @@ $lang->custom->currentLang = '适用当前语言';
$lang->custom->allLang = '适用所有语言';
$lang->custom->confirmRestore = '是否要恢复默认语言配置?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
+1 -1
View File
@@ -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>