From 389567034126d7af12e69e822d8901f64615610b Mon Sep 17 00:00:00 2001 From: root <16794640@qq.com> Date: Sun, 24 Apr 2022 11:25:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=A1=A8=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=92=8C=E7=B3=BB=E7=BB=9F=E8=A1=A8=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E7=9A=84=E6=A8=A1=E5=9E=8B=E5=92=8C=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=90=8E=E5=8F=B0=E9=94=99?= =?UTF-8?q?=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 4973a36aa..8dc4e8f1f 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -421,8 +421,8 @@ class Crud extends Command $dbname = Config::get($db . '.database'); $prefix = Config::get($db . '.prefix'); - //系统表无法生成,防止后台错乱 - if (in_array(str_replace($prefix, "", $table), $this->systemTables)) { + //系统表无法生成和系统表相同的模型和控制器,防止后台错乱 + if (in_array($model, $this->systemTables) || in_array($controller, $this->systemTables)) { throw new Exception('system table can\'t be crud'); } -- Gitee