From 7653154b20a2ef7ab8b212fdc367d9c40322eaeb Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 30 Jun 2021 10:28:51 +0800 Subject: [PATCH] * Adjust code. --- module/index/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/index/control.php b/module/index/control.php index 9c05f14ac3..76e109c4bc 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -99,7 +99,8 @@ class index extends control { $table = $this->config->objectTables[$objectType]; $field = $objectType == 'doc' ? 'assetLibType' : 'lib'; - $objectLib = $this->dao->select($field)->from($table) ->where('id')->eq($objectID)->fetchAll($field); + $objectLib = $this->dao->select($field)->from($table) ->where('id')->eq($objectID)->fetch($field); + $method = ''; if(!empty($objectLib)) { if($objectType == 'doc') @@ -111,7 +112,7 @@ class index extends control $this->app->loadConfig('action'); $method = $this->config->action->assetViewMethod[$objectType]; } - die($method); } + die($method); } }