From 3157f3a5747cba14602632fbec083f8acf5beb80 Mon Sep 17 00:00:00 2001 From: Karson Date: Thu, 10 Oct 2019 17:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=B3=E8=81=94=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6=E6=A8=A1=E5=9E=8B=E8=A1=A8=E5=90=8D=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=20=E4=BC=98=E5=8C=96=E6=8F=92=E4=BB=B6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=95=B0=E6=8D=AE=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Addon.php | 2 +- application/admin/controller/general/Config.php | 4 ++-- application/common/controller/Backend.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/admin/controller/Addon.php b/application/admin/controller/Addon.php index 7fe7946d..4d4789b0 100644 --- a/application/admin/controller/Addon.php +++ b/application/admin/controller/Addon.php @@ -61,7 +61,7 @@ class Addon extends Backend $this->error(__('No Results were found')); } if ($this->request->isPost()) { - $params = $this->request->post("row/a"); + $params = $this->request->post("row/a", [], 'trim'); if ($params) { foreach ($config as $k => &$v) { if (isset($params[$v['name']])) { diff --git a/application/admin/controller/general/Config.php b/application/admin/controller/general/Config.php index d562c2dd..8c2979c8 100644 --- a/application/admin/controller/general/Config.php +++ b/application/admin/controller/general/Config.php @@ -74,7 +74,7 @@ class Config extends Backend { if ($this->request->isPost()) { $this->token(); - $params = $this->request->post("row/a"); + $params = $this->request->post("row/a", [], 'trim'); if ($params) { foreach ($params as $k => &$v) { $v = is_array($v) ? implode(',', $v) : $v; @@ -113,7 +113,7 @@ class Config extends Backend { if ($this->request->isPost()) { $this->token(); - $row = $this->request->post("row/a"); + $row = $this->request->post("row/a", [], 'trim'); if ($row) { $configList = []; foreach ($this->model->all() as $v) { diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index a8ba6dbc..8e3474b9 100644 --- a/application/common/controller/Backend.php +++ b/application/common/controller/Backend.php @@ -267,6 +267,7 @@ class Backend extends Controller if ($relationSearch) { if (!empty($this->model)) { $name = \think\Loader::parseName(basename(str_replace('\\', '/', get_class($this->model)))); + $name = $this->model->getTable(); $tableName = $name . '.'; } $sortArr = explode(',', $sort);