From 49ff2593e5839852026832b455915705de7a133b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=8F=E9=A9=AC?= <179906767@qq.com> Date: Thu, 12 Aug 2021 23:36:41 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAdapteeInfo.php=E4=B8=ADget?= =?UTF-8?q?=5Fwftype()=E5=87=BD=E6=95=B0Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/custom/think/AdapteeInfo.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/custom/think/AdapteeInfo.php b/src/custom/think/AdapteeInfo.php index 4ba07c9..125c915 100644 --- a/src/custom/think/AdapteeInfo.php +++ b/src/custom/think/AdapteeInfo.php @@ -26,7 +26,11 @@ class AdapteeInfo function get_wftype() { if (unit::gconfig('wf_type_mode') == 0) { - return Db::query("select replace(TABLE_NAME,'" . unit::gconfig('prefix') . "','')as name,TABLE_COMMENT as title from information_schema.tables where table_schema='" . unit::gconfig('database') . "' and TABLE_COMMENT like '" . unit::gconfig('work_table') . "%' and TABLE_NAME not like '%_bak';"); + $wftypes=Db::query("select TABLE_NAME as name,TABLE_COMMENT as title from information_schema.tables where table_schema='" . unit::gconfig('database') . "' and TABLE_COMMENT like '" . unit::gconfig('work_table') . "%' and TABLE_NAME not like '%_bak';"); + foreach ($wftypes as &$wftype){ + $wftype['name']=ltrim($wftype['name'],unit::gconfig('prefix')); + } + return $wftypes; } else { return unit::gconfig('wf_type_data'); } -- Gitee