From e5235a4991445d837ca2fb18e2d4a3af1a941cad Mon Sep 17 00:00:00 2001 From: F4nniu Date: Tue, 15 Jun 2021 23:28:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E7=94=A8=E6=88=B7=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=A1=A8=E5=8A=A0=E5=85=A5=E5=88=B0=E5=8F=97=E4=BF=9D=E6=8A=A4?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index b194fa95..ec84b5ec 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -23,11 +23,12 @@ class Crud extends Command ]; /** - * 受保护的系统表,crud不会生效 + * 受保护的系统表, crud不会生效 */ - protected $systemTable = [ - 'admin','admin_log','auth_group','auth_group_access','auth_rule', - 'attachment', 'config','category' + protected $systemTables = [ + 'admin', 'admin_log', 'auth_group', 'auth_group_access', 'auth_rule', + 'attachment', 'config', 'category', 'ems', 'sms', + 'user', 'user_group', 'user_rule', 'user_score_log', 'user_token', ]; /** @@ -311,8 +312,8 @@ class Crud extends Command $prefix = Config::get($db . '.prefix'); //系统表无法生成,防止后台错乱 - if(in_array(str_replace($prefix,"",$table),$this->systemTable)){ - throw new Exception('system table name can\'t crud'); + if(in_array(str_replace($prefix,"",$table),$this->systemTables)){ + throw new Exception('system table can\'t be crud'); } //模块