diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 9384a08c..4973a36a 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -179,6 +179,8 @@ class Crud extends Command 'url' => 'url', 'image' => 'image', 'images' => 'images', + 'file' => 'file', + 'files' => 'files', 'avatar' => 'image', 'switch' => 'toggle', 'tag' => 'flag', @@ -910,6 +912,7 @@ class Crud extends Command $attrArr['data-source'] = 'auth/admin/selectpage'; } elseif ($selectpageController == 'user') { $attrArr['data-source'] = 'user/user/index'; + $attrArr['data-field'] = 'nickname'; } if ($this->isMatchSuffix($field, $this->selectpagesSuffix)) { $attrArr['data-multiple'] = 'true'; diff --git a/application/admin/command/Install/fastadmin.sql b/application/admin/command/Install/fastadmin.sql index 8e991bcf..077892f8 100755 --- a/application/admin/command/Install/fastadmin.sql +++ b/application/admin/command/Install/fastadmin.sql @@ -392,6 +392,7 @@ CREATE TABLE `fa_sms` ( DROP TABLE IF EXISTS `fa_test`; CREATE TABLE `fa_test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `user_id` int(10) DEFAULT '0' COMMENT '会员ID', `admin_id` int(10) DEFAULT '0' COMMENT '管理员ID', `category_id` int(10) unsigned DEFAULT '0' COMMENT '分类ID(单选)', `category_ids` varchar(100) COMMENT '分类ID(多选)', diff --git a/application/admin/command/Install/zh-cn.php b/application/admin/command/Install/zh-cn.php index d2e4a110..46326bbc 100644 --- a/application/admin/command/Install/zh-cn.php +++ b/application/admin/command/Install/zh-cn.php @@ -22,8 +22,8 @@ return [ 'Install Successed' => '安装成功!', 'Security tips' => '温馨提示:请将以下后台登录入口添加到你的收藏夹,为了你的安全,不要泄漏或发送给他人!如有泄漏请及时修改!', 'Please input correct database' => '请输入正确的数据库名', - 'Please input correct username' => '用户名只能由3-12位数字、字母、下划线组合', - 'Please input correct password' => '密码长度必须在6-16位之间,不能包含空格', + 'Please input correct username' => '用户名只能由3-30位数字、字母、下划线组合', + 'Please input correct password' => '密码长度必须在6-30位之间,不能包含空格', 'Password is too weak' => '密码太简单,请重新输入', 'The two passwords you entered did not match' => '两次输入的密码不一致', 'Please input correct website' => '网站名称输入不正确', diff --git a/application/admin/controller/general/Attachment.php b/application/admin/controller/general/Attachment.php index 407aff20..7c4cdfc1 100644 --- a/application/admin/controller/general/Attachment.php +++ b/application/admin/controller/general/Attachment.php @@ -85,6 +85,9 @@ class Attachment extends Backend if ($this->request->isAjax()) { return $this->index(); } + $mimetype = $this->request->get('mimetype', ''); + $mimetype = substr($mimetype, -1) === '/' ? $mimetype . '*' : $mimetype; + $this->view->assign('mimetype', $mimetype); return $this->view->fetch(); } diff --git a/application/admin/controller/general/Config.php b/application/admin/controller/general/Config.php index a77125c0..5dac56c9 100644 --- a/application/admin/controller/general/Config.php +++ b/application/admin/controller/general/Config.php @@ -69,6 +69,10 @@ class Config extends Backend $value['value'] = json_encode($dictValue, JSON_UNESCAPED_UNICODE); } $value['tip'] = htmlspecialchars($value['tip']); + if ($value['name'] == 'cdnurl') { + //cdnurl不支持在线修改 + continue; + } $siteList[$v['group']]['list'][] = $value; } $index = 0; diff --git a/application/admin/lang/zh-cn/auth/admin.php b/application/admin/lang/zh-cn/auth/admin.php index 5ff102ee..abdb1323 100644 --- a/application/admin/lang/zh-cn/auth/admin.php +++ b/application/admin/lang/zh-cn/auth/admin.php @@ -5,6 +5,6 @@ return [ 'Loginfailure' => '登录失败次数', 'Login time' => '最后登录', 'The parent group exceeds permission limit' => '父组别超出权限范围', - 'Please input correct username' => '用户名只能由3-12位数字、字母、下划线组合', - 'Please input correct password' => '密码长度必须在6-16位之间,不能包含空格', + 'Please input correct username' => '用户名只能由3-30位数字、字母、下划线组合', + 'Please input correct password' => '密码长度必须在6-30位之间,不能包含空格', ]; diff --git a/application/admin/validate/Admin.php b/application/admin/validate/Admin.php index 5b4e4e86..31268578 100644 --- a/application/admin/validate/Admin.php +++ b/application/admin/validate/Admin.php @@ -11,9 +11,9 @@ class Admin extends Validate * 验证规则 */ protected $rule = [ - 'username' => 'require|regex:\w{3,12}|unique:admin', + 'username' => 'require|regex:\w{3,30}|unique:admin', 'nickname' => 'require', - 'password' => 'require|regex:\S{32}', + 'password' => 'require|regex:\S{6,30}', 'email' => 'require|email|unique:admin,email', ]; diff --git a/application/admin/validate/User.php b/application/admin/validate/User.php index 252f4cf5..7d7e0f50 100644 --- a/application/admin/validate/User.php +++ b/application/admin/validate/User.php @@ -10,9 +10,9 @@ class User extends Validate * 验证规则 */ protected $rule = [ - 'username' => 'require|regex:\w{3,32}|unique:user', + 'username' => 'require|regex:\w{3,30}|unique:user', 'nickname' => 'require|unique:user', - 'password' => 'regex:\S{6,32}', + 'password' => 'regex:\S{6,30}', 'email' => 'require|email|unique:user', 'mobile' => 'unique:user' ]; diff --git a/application/admin/view/general/attachment/select.html b/application/admin/view/general/attachment/select.html index fbddcc32..0548effb 100644 --- a/application/admin/view/general/attachment/select.html +++ b/application/admin/view/general/attachment/select.html @@ -31,7 +31,7 @@