diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 4973a36aa9ac40f423fda38d3be8f67fd7c39a6c..8dc4e8f1f7389d912388cb7af456b13d30934fe6 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'); }