From e08e427f9d756f7cff9ecdff71b12933d234655d Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 4 Jul 2017 16:37:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=AD=A3=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E5=8D=87=E7=BA=A7=E5=90=8E=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/controller/BasicAdmin.php | 2 +- extend/service/DataService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extend/controller/BasicAdmin.php b/extend/controller/BasicAdmin.php index 65ec789ea..c9e12a492 100644 --- a/extend/controller/BasicAdmin.php +++ b/extend/controller/BasicAdmin.php @@ -105,7 +105,7 @@ class BasicAdmin extends Controller { } // 列表数据查询与显示 if (null === $db->getOptions('order')) { - $fields = $db->getTableFields(['table' => $db->getTable()]); + $fields = $db->getTableFields($db->getTable()); in_array('sort', $fields) && $db->order('sort asc'); } $result = array(); diff --git a/extend/service/DataService.php b/extend/service/DataService.php index 98fcffdac..2a33d11ea 100644 --- a/extend/service/DataService.php +++ b/extend/service/DataService.php @@ -95,7 +95,7 @@ class DataService { // 删除模式,如果存在 is_deleted 字段使用软删除 if ($field === 'delete') { if (method_exists($db, 'getTableFields')) { - if (in_array('is_deleted', $db->getTableFields(['table' => $db->getTable()]))) { + if (in_array('is_deleted', $db->getTableFields($db->getTable()))) { return false !== $db->where($where)->update(['is_deleted' => 1]); } } @@ -105,4 +105,4 @@ class DataService { return false !== $db->where($where)->update([$field => $value]); } -} \ No newline at end of file +}