From e0b008097a035afd39bef68de0501880e368d7f7 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 9 Jun 2021 14:08:50 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=97=B6=EF=BC=8C=E8=85=BE=E8=AE=AF=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E9=82=AE=E7=AE=B1=E8=BF=94=E5=9B=9E=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E7=BC=96=E7=A0=81=E5=BD=B1=E5=93=8D?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/library/Email.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/common/library/Email.php b/application/common/library/Email.php index 7636d761..4ddb0b65 100644 --- a/application/common/library/Email.php +++ b/application/common/library/Email.php @@ -219,6 +219,7 @@ class Email preg_match_all("/Expected: (\d+)\, Got: (\d+)( \| (.*))?\$/i", $e->getMessage(), $matches); $code = isset($matches[2][3]) ? $matches[2][3] : 0; $message = isset($matches[2][0]) ? $matches[4][0] : $e->getMessage(); + $message = mb_convert_encoding($message, 'UTF-8', 'GBK,GB2312,BIG5'); $this->setError($message); } catch (\Exception $e) { $this->setError($e->getMessage()); From 364d7be7badceeac36632901ecd65dcd27d1ff39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=E8=B6=85?= <23939139@qq.com> Date: Thu, 10 Jun 2021 11:00:46 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E8=8F=9C=E5=8D=95icon=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/library/Auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/library/Auth.php b/application/admin/library/Auth.php index 5e265f5c..64bf1eec 100644 --- a/application/admin/library/Auth.php +++ b/application/admin/library/Auth.php @@ -473,7 +473,7 @@ class Auth extends \fast\Auth foreach ($topList as $index => $item) { $childList = Tree::instance()->getTreeMenu( $item['id'], - '
  • @title @caret @badge @childlist
  • ', + '
  • @title @caret @badge @childlist
  • ', $select_id, '', 'ul', @@ -495,7 +495,7 @@ class Auth extends \fast\Auth Tree::instance()->init($ruleList); $menu = Tree::instance()->getTreeMenu( 0, - '
  • @title @caret @badge @childlist
  • ', + '
  • @title @caret @badge @childlist
  • ', $select_id, '', 'ul', From 6edcaffa75feaa27da861b10fe25d7830a97c5c7 Mon Sep 17 00:00:00 2001 From: wanger <18037235202@163.com> Date: Thu, 27 May 2021 20:02:25 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=A1=A8=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90=E8=A2=AB=E8=A6=86?= =?UTF-8?q?=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 927625b7..372fce47 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -21,6 +21,14 @@ class Crud extends Command protected $internalKeywords = [ 'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list', 'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once', 'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor' ]; + + /** + * 受保护的系统表,crud不会生效 + */ + protected $systemTable = [ + 'admin', 'attachment', 'auth_group', 'auth_group_access', 'auth_rule', 'category', 'config' + ]; + /** * Selectpage搜索字段关联 */ @@ -204,9 +212,12 @@ class Crud extends Command $force = $input->getOption('force'); //是否为本地model,为0时表示为全局model将会把model放在app/common/model中 $local = $input->getOption('local'); + if (!$table) { throw new Exception('table name can\'t empty'); } + + //是否生成菜单 $menu = $input->getOption("menu"); //关联表 @@ -298,6 +309,11 @@ class Crud extends Command $dbname = Config::get($db . '.database'); $prefix = Config::get($db . '.prefix'); + //系统表无法生成,防止后台错乱 + if(in_array(str_replace($prefix,"",$table),$this->systemTable)){ + throw new Exception('system table name can\'t crud'); + } + //模块 $moduleName = 'admin'; $modelModuleName = $local ? $moduleName : 'common'; From f05e5ae72208d3b758a0b95e717a07e794c17fdb Mon Sep 17 00:00:00 2001 From: wanger <18037235202@163.com> Date: Thu, 27 May 2021 20:08:48 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0admin=5Flog=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 372fce47..b194fa95 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -26,7 +26,8 @@ class Crud extends Command * 受保护的系统表,crud不会生效 */ protected $systemTable = [ - 'admin', 'attachment', 'auth_group', 'auth_group_access', 'auth_rule', 'category', 'config' + 'admin','admin_log','auth_group','auth_group_access','auth_rule', + 'attachment', 'config','category' ]; /** @@ -313,7 +314,7 @@ class Crud extends Command if(in_array(str_replace($prefix,"",$table),$this->systemTable)){ throw new Exception('system table name can\'t crud'); } - + //模块 $moduleName = 'admin'; $modelModuleName = $local ? $moduleName : 'common'; From e5235a4991445d837ca2fb18e2d4a3af1a941cad Mon Sep 17 00:00:00 2001 From: F4nniu Date: Tue, 15 Jun 2021 23:28:58 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=B0=86=E7=94=A8=E6=88=B7=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A1=A8=E5=8A=A0=E5=85=A5=E5=88=B0=E5=8F=97=E4=BF=9D?= =?UTF-8?q?=E6=8A=A4=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'); } //模块 From 614384a2bba7ac22e87bf6aef7642e8ff25dda95 Mon Sep 17 00:00:00 2001 From: wanger <18037235202@163.com> Date: Tue, 25 May 2021 17:10:53 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcrud=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=97=B6=E6=9C=AA=E9=80=89=E4=B8=ADid?= =?UTF-8?q?=E4=B8=BB=E9=94=AE=E6=97=B6=E5=AF=BC=E8=87=B4=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index ec84b5ec..781dd061 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -899,7 +899,7 @@ class Crud extends Command 'recyclebinJs' => '', 'headingHtml' => $headingHtml, 'recyclebinHtml' => $recyclebinHtml, - 'visibleFieldList' => $fields ? "\$row->visible(['" . implode("','", array_filter(explode(',', $fields))) . "']);" : '', + 'visibleFieldList' => $fields ? "\$row->visible(['" . implode("','", array_filter(in_array($priKey,explode(',', $fields))?explode(',', $fields):explode(',',$priKey.','.$fields))) . "']);" : '', 'appendAttrList' => implode(",\n", $appendAttrList), 'getEnumList' => implode("\n\n", $getEnumArr), 'getAttrList' => implode("\n\n", $getAttrArr),